sherlock-project/sherlock

Pandas installing error metadata-generation-failed

senza1 opened this issue · 1 comments

When installing requirements pandas is showing error that preparing metadata (pyproject.toml) did not run successfully

Using cached pandas-2.2.1.tar.gz (4.4 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... error
error: subprocess-exited-with-error

× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [31 lines of output]
+ meson setup /data/data/com.termux/files/usr/tmp/pip-install-uub6bc0m/pandas_f7107f2af033451da25141e77d5f2082 /data/data/com.termux/files/usr/tmp/pip-install-uub6bc0m/pandas_f7107f2af033451da25141e77d5f2082/.mesonpy-koz_ip_4/build -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --vsenv --native-file=/data/data/com.termux/files/usr/tmp/pip-install-uub6bc0m/pandas_f7107f2af033451da25141e77d5f2082/.mesonpy-koz_ip_4/build/meson-python-native-file.ini
The Meson build system
Version: 1.2.1
Source dir: /data/data/com.termux/files/usr/tmp/pip-install-uub6bc0m/pandas_f7107f2af033451da25141e77d5f2082
Build dir: /data/data/com.termux/files/usr/tmp/pip-install-uub6bc0m/pandas_f7107f2af033451da25141e77d5f2082/.mesonpy-koz_ip_4/build
Build type: native build
Project name: pandas
Project version: 2.2.1
C compiler for the host machine: cc (clang 18.1.2 "clang version 18.1.2")
C linker for the host machine: cc ld.lld 18.1.2
C++ compiler for the host machine: c++ (clang 18.1.2 "clang version 18.1.2")
C++ linker for the host machine: c++ ld.lld 18.1.2
Cython compiler for the host machine: cython (cython 3.0.5)
Host machine cpu family: aarch64
Host machine cpu: aarch64
Program python found: YES (/data/data/com.termux/files/usr/bin/python3.11)

  ../../pandas/meson.build:1:15: ERROR: Command `/data/data/com.termux/files/usr/bin/python3.11 -c '
  import os
  import numpy as np
  try:
      # Check if include directory is inside the pandas dir
      # e.g. a venv created inside the pandas dir
      # If so, convert it to a relative path
      incdir = os.path.relpath(np.get_include())
  except Exception:
      incdir = np.get_include()
  print(incdir)
       '` failed with status 1.

  A full log can be found at /data/data/com.termux/files/usr/tmp/pip-install-uub6bc0m/pandas_f7107f2af033451da25141e77d5f2082/.mesonpy-koz_ip_4/build/meson-logs/meson-log.txt
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

Hi @senza1. Thank you for opening this issue.

To install pandas in a Termux environment, you need to follow a few extra steps. Read my response at: #1945 (comment)