简体   繁体   中英

Cartopy python Package (PEP 517) wheel building

I am trying to make a program with tropycal but it shows a wheel building error for a package dependency. Called Cartopy.

Pip3 Error:

ERROR: Could not build wheels for cartopy which use PEP 517 and cannot be installed directly.

I tried a solution from another StackOverflow question :

pip3 install cartopy --no-binary :all:

But it takes full CPU Power (100) and increases the CPU's temperature/thermal energy to 81 Celcius / 354.15 kelvin.

The Python version I am using is Python 3.8

I have Linux Mint

Try to get the wheel from Christoph Gohlke ( link ); search for cartopy and select the one for your version of Python (it looks like it is updated up to Python 3.10). Download the wheel and pip install, like:

pip install Cartopy‑0.20.2‑cp38‑cp38‑win_amd64.whl

(for Python 3.8)

Whereby the file Cartopy‑0.20.2‑cp38‑cp38‑win_amd64.whl is in the folder where you start the pip .

But it takes full CPU Power (100) and increases the CPU's temperature/thermal energy to 81 Celcius / 354.15 kelvin.

If the no-binary flag doesn't work (as you described above) , it can be due to cache issues.

Instead of pip3 install cartopy --no-binary:all: you may try pip3 install cartopy --no-cache-dir .

Another option would be to install the dependencies manually an then continue trying to install the package using pip. A list of the required dependencies can be found here .

Another approach which I found on various forums (such as this link ) is to upgrade wheels first before re-trying the cartopy installation. This can be done via pip3 install --upgrade pip setuptools wheel !

As a last resort (and this should only be used if no other options work) , you may go ahead and disable the PEP 517 flag: pip3 install cartopy --no-use-pep517 . This will most likely result in a lower quality build of the cartopy package and thus is not suggested.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM