termux / termux-packages

A package build system for Termux.
https://termux.dev
Other
13.41k stars 3.09k forks source link

[Bug]: Cannot install Python package `contextily` #21882

Open egeres opened 4 months ago

egeres commented 4 months ago

Problem description

I'm not entirely sure if this is a termux issue, anyways, If I run:

pip install contextily

I get the following error:

~ $ pip install contextily
Collecting contextily
  Using cached contextily-1.6.0-py3-none-any.whl.metadata (2.9 kB)
Collecting geopy (from contextily)
  Using cached geopy-2.4.1-py3-none-any.whl.metadata (6.8 kB)
Requirement already satisfied: matplotlib in /data/data/com.termux/files/usr/lib/python3.11/site-packages (from contextily) (3.8.3)
Collecting mercantile (from contextily)
  Using cached mercantile-1.2.1-py3-none-any.whl.metadata (4.8 kB)
Requirement already satisfied: pillow in /data/data/com.termux/files/usr/lib/python3.11/site-packages (from contextily) (10.2.0)
Collecting rasterio (from contextily)
  Using cached rasterio-1.3.10.tar.gz (412 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [2 lines of output]
      <string>:22: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
      ERROR: Numpy and its headers are required to run setup().
      [end of output]

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

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.r

Steps to reproduce the behavior.

Run:

pip install contextily

What is the expected behavior?

The package is installed

System information

Biswa96 commented 4 months ago

Try to install python-numpy package first.

egeres commented 4 months ago

I already have it installed (and all packages upgraded)... also, I realized the problem actually comes from rasterio, so it can be reproduced by running pip install rasterio