Closed alex4200 closed 2 years ago
lib/cartopy/trace.cpp:626:20: fatal error: geos_c.h: No such file or directory
You need to install GEOS devel package; please ensure you have installed everything in the requirements.
I did a conda install -c conda-forge cartopy
, but afterwards I still get an error when I try to import cartopy
to python (python 3.5.2):
ImportError: No module named 'cartopy'
That's not much to go on. Did you ensure you installed into the active environment and that it is currently active for the Python you are running?
try sudo apt-get install libgeos++-dev
lib/cartopy/trace.cpp:626:20: fatal error: geos_c.h: No such file or directory
You need to install GEOS devel package; please ensure you have installed everything in the requirements.
Is it necessary to install GEOS devel package?
In my case, I have just pip
installed Cartopy
. When trying to run some examples from the website (like this one), Python crashes unexpectedly and I get the following error in the console: Bus error: 10
. Surprisingly, this seems to work:
import cartopy.crs as ccrs
import matplotlib.pyplot as plt
ax = plt.axes(projection=ccrs.EuroPP())
ax.stock_img()
plt.show()
It produces an image of Europe.
I have installed latest GEOS (3.7.0) using brew
.
MacOS 10.12.6, using a virtualenv with Python 3.7.0. Also, following the requirements:
Cartopy==0.17.0
numpy==1.15.3
Cython==0.29
Shapely==1.6.4.post2
pyshp==2.0.1
six==1.11.0
proj --> Rel. 5.2.0, September 15th, 2018
geos-config --version --> 3.7.0
What could be going on?
With the geos devel installed, and doing pip3 install cartopy
, I now get an error:
...
lib/cartopy/_crs.c:611:22: fatal error: proj_api.h: No such file or directory
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
...
What is missing now?
U are supposed to. Install proj4 using brew and not the proj python module
Le lun. 10 déc. 2018 à 06:29, alex4200 notifications@github.com a écrit :
With the geos devel installed, and doing pip3 install cartopy, I now get an error:
... lib/cartopy/_crs.c:611:22: fatal error: proj_api.h: No such file or directory compilation terminated. error: command 'x86_64-linux-gnu-gcc' failed with exit status 1 ...
What is missing now?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/SciTools/cartopy/issues/1239#issuecomment-445702108, or mute the thread https://github.com/notifications/unsubscribe-auth/AMbr8ykGo4GfDiqV87JXaN-sfwONbctzks5u3f9ggaJpZM4ZH-Kx .
sudo apt-get install proj4
:
E: Unable to locate package proj4
Maybe cartopy is still in development and not useable?
Sudo apt-get search proj
Le lun. 10 déc. 2018 à 07:19, alex4200 notifications@github.com a écrit :
sudo apt-get install proj4:
E: Unable to locate package proj4
Maybe cartopy is still in development and not useable?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/SciTools/cartopy/issues/1239#issuecomment-445711029, or mute the thread https://github.com/notifications/unsubscribe-auth/AMbr83QPlnUJitdP4-pRuuNI8U7hHBuFks5u3grogaJpZM4ZH-Kx .
Or search for libproj please
Le lun. 10 déc. 2018 à 08:33, Sim sim4n6@gmail.com a écrit :
Sudo apt-get search proj
Le lun. 10 déc. 2018 à 07:19, alex4200 notifications@github.com a écrit :
sudo apt-get install proj4:
E: Unable to locate package proj4
Maybe cartopy is still in development and not useable?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/SciTools/cartopy/issues/1239#issuecomment-445711029, or mute the thread https://github.com/notifications/unsubscribe-auth/AMbr83QPlnUJitdP4-pRuuNI8U7hHBuFks5u3grogaJpZM4ZH-Kx .
sudo apt-get search proj
E: Invalid operation search
Sorry that was sudo apt search proj
Le lun. 10 déc. 2018 à 07:41, alex4200 notifications@github.com a écrit :
sudo apt-get search proj E: Invalid operation search
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/SciTools/cartopy/issues/1239#issuecomment-445718757, or mute the thread https://github.com/notifications/unsubscribe-auth/AMbr82V0tX5Vje-QBcMtsYhzz877ddYeks5u3hASgaJpZM4ZH-Kx .
Ok thanks. I installed libproj-dev
and I was finally(!) able to install cartopy via
pip3 install cartopy
But when I try to import it of course it does not work:
Traceback (most recent call last):
File "flights.py", line 7, in <module>
import cartopy.crs as ccrs
File "/home/adietz/temp/venv/lib/python3.5/site-packages/cartopy/__init__.py", line 107, in <module>
import cartopy.crs
File "/home/adietz/temp/venv/lib/python3.5/site-packages/cartopy/crs.py", line 38, in <module>
import cartopy.trace
ImportError: libproj.so.13: cannot open shared object file: No such file or directory
Maybe I better give up? Seems that project cartopy
is at the very early beginning...
Is it necessary to install GEOS devel package?
@iipr This issue is about installing Cartopy on Linux from source, so yes. Your issue is about running Cartopy on macOS, which is unrelated. Your issue is probably #879.
ImportError: libproj.so.13: cannot open shared object file: No such file or directory
@alex4200 You seem to have mixed up environments. Maybe you had a conda environment activated at some point during the compile or the test, and not the other.
@QuLogic So what to do now?
Start with a fresh environment? You need to consistently use either a virtualenv or conda environment and not mix them.
Does not help. I started a new virtuelenv
and reinstalled cartopy
and matplotlib
But I stil get the error
Traceback (most recent call last):
File "flights.py", line 7, in <module>
import cartopy.crs as ccrs
File "/home/adietz/temp/venv/lib/python3.5/site-packages/cartopy/__init__.py", line 107, in <module>
import cartopy.crs
File "/home/adietz/temp/venv/lib/python3.5/site-packages/cartopy/crs.py", line 38, in <module>
import cartopy.trace
ImportError: libproj.so.13: cannot open shared object file: No such file or directory
Please post the exact commands you are running. There is no libproj.so.13 on Ubuntu 16.04, so something is still mixed up.
I dont get it. The error msg tells that you have kind of not an installed proj please check this direct link https://proj4.org/install.html#mac-os-x
Le lun. 10 déc. 2018 à 08:27, alex4200 notifications@github.com a écrit :
Does not help. I started a new virtuelenv and reinstalled cartopy and matplotlib But I stil get the error
Traceback (most recent call last): File "flights.py", line 7, in
import cartopy.crs as ccrs File "/home/adietz/temp/venv/lib/python3.5/site-packages/cartopy/init.py", line 107, in import cartopy.crs File "/home/adietz/temp/venv/lib/python3.5/site-packages/cartopy/crs.py", line 38, in import cartopy.trace ImportError: libproj.so.13: cannot open shared object file: No such file or directory — You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/SciTools/cartopy/issues/1239#issuecomment-445730590, or mute the thread https://github.com/notifications/unsubscribe-auth/AMbr89-PUm5rg3Vp5aeuHgoIDezm_lEhks5u3hrugaJpZM4ZH-Kx .
python3 -c "import cartopy"
@Sim4n6 : I suggest to update the installation documentation. Also, I am trying to use that package on Ubuntu 16.04.5 ...
@Sim4n6 you are confusing @alex4200 with @iipr.
@alex4200 post the commands you used to create the environment and install Cartopy.
virtualenv -p python3 venv
. venv/bin/activate
Sorry guys, I'm out
Le lun. 10 déc. 2018 à 08:37, alex4200 notifications@github.com a écrit :
virtualenv -p python3 venv . venv/bin/activate
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/SciTools/cartopy/issues/1239#issuecomment-445733167, or mute the thread https://github.com/notifications/unsubscribe-auth/AMbr8-F9j3M5n7G0DZqR9E59PMY1zPawks5u3h02gaJpZM4ZH-Kx .
When I remove everything related to 'proj': proj-bin, proj-data, libproj-dev
I get a slightly different error:
$ python3 -c "import cartopy"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/adietz/temp/venv/lib/python3.5/site-packages/cartopy/__init__.py", line 107, in <module>
import cartopy.crs
File "/home/adietz/temp/venv/lib/python3.5/site-packages/cartopy/crs.py", line 36, in <module>
from cartopy._crs import CRS, Geodetic, Globe, PROJ4_VERSION
ImportError: libproj.so.9: cannot open shared object file: No such file or directory
Is it necessary to install GEOS devel package?
@iipr This issue is about installing Cartopy on Linux from source, so yes. Your issue is about running Cartopy on macOS, which is unrelated. Your issue is probably #879.
Apologies for the misunderstanding... Following the issue you mentioned, it looks like it is working now! Thanks a lot @QuLogic
I think this is now resolved by the OP, and that there isn't anything that needs changing in the codebase. Please re-open if incorrect.
Summary to fix the issue on Ubuntu 18.04:
sudo apt-get install libgeos++-dev
sudo apt-get install libproj-dev
pip install geoplot
Where pip is the package manager of your virtualenv.
cartopy supports to run on windows?
Summary to fix the issue on Ubuntu 8.04:
sudo apt-get install libgeos++-dev sudo apt-get install libproj-dev pip install geoplot
Where pip is the package manager of your virtualenv.
I guess you meant Ubuntu 18.04.. Thanks a lot, these 2 packages solved my problem after having installed all the Python dependencies.
On my Lubuntu 20.04 LTS system, installing geoplot
was not necessary, but the other 2 libs were needed:
sudo apt-get install libgeos++-dev
sudo apt-get install libproj-dev
Now, it works like a charm. I hope the cartopy
- team will make the error-messages more informative with the right hints how to resolve the errors. Thanks :)
I am still facing this issue.
python: 3.9.7 (default, Sep 9 2021, 23:20:13) [GCC 9.3.0],
cartopy: 0.19.0.post1,
I mean, it didn't take me long to figure out that I am missing Geos, but is there a way to print a more user-friendly message?
@Demetrio92 If you have suggestions on what an improved error behavior could be, feel free to open an issue with the current output you see and what you would like to see.
@dopplershift
Nevermind, cannot reproduce.
from ubuntu:20.04
RUN apt update
RUN apt install python3-pip -y
RUN pip install cartopy
Step 4/4 : RUN pip install cartopy
---> Running in 459c86dd0ee9
Collecting cartopy
Downloading Cartopy-0.20.1.tar.gz (10.8 MB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 /tmp/tmpptf05biv get_requires_for_build_wheel /tmp/tmp4hcq5ek0
cwd: /tmp/pip-install-8q6vonwp/cartopy
Complete output (3 lines):
setup.py:117: UserWarning: Unable to determine GEOS version. Ensure you have 3.7.2 or later installed, or installation may fail.
warnings.warn(
Proj 8.0.0 must be installed.
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 /tmp/tmpptf05biv get_requires_for_build_wheel /tmp/tmp4hcq5ek0 Check the logs for full command output.
The command '/bin/sh -c pip install cartopy' returned a non-zero code: 1
^ this is exactly what I would expect.
Instead I got 300 lines of gcc logs ending with
/venv/.venv/include -I/usr/include/python3.9 -c lib/cartopy/trace.cpp -o build/temp.linux-x86_64-3.9/lib/cartopy/trace.o
lib/cartopy/trace.cpp:633:10: fatal error: geos_c.h: No such file or directory
633 | #include "geos_c.h"
| ^~~~~~~~~~
compilation terminated.
error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
I'll dig more and try to reproduce this
Well, if you install with pip install -v
you see the compile logs, which can be helpful. Regardless, not a cartopy issue it seems.
As per title, will not install on vanilla Ubuntu 20 LTS:
sudo apt update
sudo apt install python3-pip -y
pip install cartopy
Errors out:
Proj version 6.3.1 is installed, but cartopy requires at least version 8.0.0
Have tried installing dev-versions of all obvious libraries including lib-proj
using apt
and pip
but I refuse to clone random git repos or compile anything from source.
Is this hopeless? Also, whose responsibility is it that Cartopy is broken on the most recent major release of the biggest Linux distro?
@Friptick this should not happen, upgrade your pip. pip should automatically downgrade package version to 19, which works fine with ubuntu LTS.
This took me way longer than it should have. But I have a reproducible working dockerfile confirming the above claim:
from ubuntu:20.04
RUN apt update
RUN apt install libgeos++-dev -y
RUN apt install libproj-dev proj-data proj-bin -y
RUN apt install libproj15 -y
RUN apt install python3-pip -y
RUN pip install --upgrade pip
RUN pip install cartopy
It will run into the issue with cartopy 20.X and then attempt to install lower version numbers eventually settling at 0.19.0.post1
@Friptick
@Demetrio92 First, thanks for taking the time. Appreciated.
$ sudo apt update
$ sudo apt install libgeos++-dev -y
$ sudo apt install libproj-dev proj-data proj-bin -y
$ sudo apt install libproj15 -y
$ sudo apt install python3-pip -y
All returned X is already the newest version
. So far so good.
$ pip install --upgrade pip
Collecting pip
Downloading pip-21.3.1-py3-none-any.whl (1.7 MB)
Installing collected packages: pip
Successfully installed pip-21.3.1
$ pip install cartopy
Collecting cartopy
Downloading Cartopy-0.20.1.tar.gz (10.8 MB)
| ========================= | 10.8 MB 2.7 MB/s
Installing build dependencies ... done
Getting requirements to build wheel ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 /tmp/tmp7jvrtd_6 get_requires_for_build_wheel /tmp/tmp2dehdn85
cwd: /tmp/pip-install-31rd5efs/cartopy
Complete output (1 lines):
Proj version 6.3.1 is installed, but cartopy requires at least version 8.0.0.
What gives?
@Friptick this is expected. However, pip should proceed with trying to install Cartopy-0.20.0.tar.gz
fail again, then try Cartopy-0.19.0.post1.tar.gz
which should work.
Try the docker I posted to confirm. Then figure out how and why your environment is different. Once you're able to narrow it down, head over to https://github.com/pypa/pip and post an issue there.
If you're not interested in solving or debugging the issue, as a workaround this should work
pip install cartopy==0.19.0.post1
@Demetrio92 Thanks so much for the workaround. Everything back in order.
Alas I am indeed not interested in spending any more time on this, it was just to unbreak a script which displays a single GPX file.
Apparently I have some weird config interference. In my limited experience pip
always involves some crossing of fingers, unlike apt
, which never breaks ever. Whatever. If anyone else gets the issue and wants to follow up they now have something to go on. So thanks again.
I just ran into this using Ubuntu 20.04
and Poetry
on a python -V 3.9.9
venv.
TL;DR Version
// Install PROJ
$ sudo apt-get install proj-bin
$ proj
Rel. 7.2.1, January 1st, 2021
// Add the Ubuntu GIS PPA
$ sudo apt-get install python-software-properties
$ sudo add-apt-repository ppa:ubuntugis/ppa
// Install the geos packages
$ sudo apt-get install libproj-dev libgeos++-dev libgeos-3.8.0 libgeos-c1v5 libgeos-dev libgeos-doc
// Pin Cartopy version unless installing PROJ via source or using conda.
// Ubuntu GIS PPA doesn't have the newest PROJ
$ poetry add cartopy==0.19.0.post1
How I ran across it was an attempt at installing Traffic.. Then I said hmmm.... That's odd. Poetry does really well with dependency conflict resolution (nearly bulletproof). Then instead, I tried installing just Cartopy to see if Poetry would resolve. Nope. Same problem.
#pyproject.toml
[tool.poetry.dependencies]
python = ">=3.7.1,<3.10"
pandas = "^1.3.4"
wget = "^3.2"
[tool.poetry.dev-dependencies]
black = "^21.12b0"
mypy = "^0.910"
flake8-isort = "^4.1.1"
pylint = "^2.12.2"
pep8-naming = "^0.12.1"
flake8-builtins = "^1.5.3"
flake8-bugbear = "^21.11.29"
isort = "^5.10.1"
cartopy
$ poetry add cartopy
Using version ^0.20.1 for Cartopy
Updating dependencies
Resolving dependencies... (1.0s)
Package operations: 13 installs, 0 updates, 0 removals
• Installing pyparsing (3.0.6)
• Installing packaging (21.3)
• Installing certifi (2021.10.8)
• Installing cycler (0.11.0)
• Installing fonttools (4.28.3)
• Installing kiwisolver (1.3.2)
• Installing pillow (8.4.0)
• Installing setuptools-scm (6.3.2)
• Installing matplotlib (3.5.0)
• Installing pyproj (3.2.1)
• Installing pyshp (2.1.3)
• Installing shapely (1.8.0)
• Installing cartopy (0.20.1): Failed
EnvCommandError
Command ['/home/bstivers/Devel/python_stuff/snippets/.venv/bin/pip', 'install', '--no-deps', 'file:///home/bstivers/.cache/pypoetry/artifacts/65/e7/c8/4c2ca6b556680a35806b256956e1eea885af77617ad75afd28d588f87f/Cartopy-0.20.1.tar.gz'] errored with the following return code 1, and output:
Processing /home/bstivers/.cache/pypoetry/artifacts/65/e7/c8/4c2ca6b556680a35806b256956e1eea885af77617ad75afd28d588f87f/Cartopy-0.20.1.tar.gz
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /home/bstivers/Devel/python_stuff/snippets/.venv/bin/python /home/bstivers/Devel/python_stuff/snippets/.venv/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_wheel /tmp/tmpl80dgscn
cwd: /tmp/pip-req-build-6wjlt9hg
Complete output (3 lines):
setup.py:117: UserWarning: Unable to determine GEOS version. Ensure you have 3.7.2 or later installed, or installation may fail.
warnings.warn(
Proj 8.0.0 must be installed.
----------------------------------------
WARNING: Discarding file:///home/bstivers/.cache/pypoetry/artifacts/65/e7/c8/4c2ca6b556680a35806b256956e1eea885af77617ad75afd28d588f87f/Cartopy-0.20.1.tar.gz. Command errored out with exit status 1: /home/bstivers/Devel/python_stuff/snippets/.venv/bin/python /home/bstivers/Devel/python_stuff/snippets/.venv/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_wheel /tmp/tmpl80dgscn Check the logs for full command output.
ERROR: Command errored out with exit status 1: /home/bstivers/Devel/python_stuff/snippets/.venv/bin/python /home/bstivers/Devel/python_stuff/snippets/.venv/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_wheel /tmp/tmpl80dgscn Check the logs for full command output.
at ~/.local/share/pypoetry/venv/lib/python3.8/site-packages/poetry/utils/env.py:1183 in _run
1179│ output = subprocess.check_output(
1180│ cmd, stderr=subprocess.STDOUT, **kwargs
1181│ )
1182│ except CalledProcessError as e:
→ 1183│ raise EnvCommandError(e, input=input_)
1184│
1185│ return decode(output)
1186│
1187│ def execute(self, bin, *args, **kwargs):
Failed to add packages, reverting the pyproject.toml file to its original content.
cartopy
as a dependency)Take note of the Installing cartopy (0.19.0.post1): Failed
part.
$ poetry add traffic
Using version ^2.6.6 for traffic
Updating dependencies
Resolving dependencies... (3.8s)
Writing lock file
Package operations: 95 installs, 0 updates, 0 removals
• Installing pyrsistent (0.18.0)
• Installing traitlets (5.1.1)
• Installing entrypoints (0.3)
• Installing ipython-genutils (0.2.0)
• Installing jsonschema (4.2.1)
• Installing jupyter-core (4.9.1)
• Installing nest-asyncio (1.5.4)
• Installing parso (0.8.3)
• Installing ptyprocess (0.7.0)
• Installing pyparsing (3.0.6)
• Installing pyzmq (22.3.0)
• Installing tornado (6.1)
• Installing wcwidth (0.2.5)
• Installing backcall (0.2.0)
• Installing decorator (5.1.0)
• Installing jedi (0.18.1)
• Installing jupyter-client (7.1.0)
• Installing markupsafe (2.0.1)
• Installing matplotlib-inline (0.1.3)
• Installing nbformat (5.1.3)
• Installing packaging (21.3)
• Installing pexpect (4.8.0)
• Installing pickleshare (0.7.5)
• Installing prompt-toolkit (3.0.23)
• Installing pycparser (2.21)
• Installing pygments (2.10.0)
• Installing webencodings (0.5.1)
• Installing bleach (4.1.0)
• Installing cffi (1.15.0)
• Installing debugpy (1.5.1)
• Installing defusedxml (0.7.1)
• Installing ipython (7.30.1)
• Installing jinja2 (3.0.3)
• Installing jupyterlab-pygments (0.1.2)
• Installing mistune (0.8.4)
• Installing nbclient (0.5.9)
• Installing pandocfilters (1.5.0)
• Installing testpath (0.5.0)
• Installing argon2-cffi (21.1.0)
• Installing ipykernel (6.6.0)
• Installing nbconvert (6.3.0)
• Installing prometheus-client (0.12.0)
• Installing send2trash (1.8.0)
• Installing terminado (0.12.1)
• Installing certifi (2021.10.8)
• Installing click-plugins (1.1.1)
• Installing cligj (0.7.2)
• Installing munch (2.5.0)
• Installing notebook (6.4.6)
• Installing charset-normalizer (2.0.9)
• Installing cryptography (36.0.0): Installing...
• Installing cycler (0.11.0)
• Installing fiona (1.8.20): Installing...
• Installing cycler (0.11.0)
• Installing fiona (1.8.20): Installing...
• Installing cryptography (36.0.0)
• Installing cycler (0.11.0)
• Installing fiona (1.8.20): Installing...
• Installing fiona (1.8.20)
• Installing fonttools (4.28.3)
• Installing idna (3.3)
• Installing jupyterlab-widgets (1.0.2)
• Installing kiwisolver (1.3.2)
• Installing networkx (2.6.3)
• Installing pillow (8.4.0)
• Installing pyproj (3.2.1)
• Installing pyshp (2.1.3)
• Installing scipy (1.7.3)
• Installing setuptools-scm (6.3.2)
• Installing shapely (1.8.0)
• Installing urllib3 (1.26.7)
• Installing widgetsnbextension (3.5.2)
• Installing zipp (3.6.0)
• Installing appdirs (1.4.4)
• Installing bcrypt (3.2.0): Installing...
• Installing bcrypt (3.2.0)
• Installing cartopy (0.19.0.post1): Failed
EnvCommandError
Command ['/home/bstivers/Devel/python_stuff/snippets/.venv/bin/pip', 'install', '--no-deps', 'file:///home/bstivers/.cache/pypoetry/artifacts/c5/2b/aa/11bbd53899dcd617e446bc633ba91d1bec77f6256145eb09e72f4d2fa6/Cartopy-0.19.0.post1.tar.gz'] errored with the following return code 1, and output:
Processing /home/bstivers/.cache/pypoetry/artifacts/c5/2b/aa/11bbd53899dcd617e446bc633ba91d1bec77f6256145eb09e72f4d2fa6/Cartopy-0.19.0.post1.tar.gz
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /home/bstivers/Devel/python_stuff/snippets/.venv/bin/python /home/bstivers/Devel/python_stuff/snippets/.venv/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_wheel /tmp/tmp36qez7kz
cwd: /tmp/pip-req-build-qskfmbkk
Complete output (3 lines):
setup.py:117: UserWarning: Unable to determine GEOS version. Ensure you have 3.3.3 or later installed, or installation may fail.
warnings.warn(
Proj 4.9.0 must be installed.
----------------------------------------
WARNING: Discarding file:///home/bstivers/.cache/pypoetry/artifacts/c5/2b/aa/11bbd53899dcd617e446bc633ba91d1bec77f6256145eb09e72f4d2fa6/Cartopy-0.19.0.post1.tar.gz. Command errored out with exit status 1: /home/bstivers/Devel/python_stuff/snippets/.venv/bin/python /home/bstivers/Devel/python_stuff/snippets/.venv/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_wheel /tmp/tmp36qez7kz Check the logs for full command output.
ERROR: Command errored out with exit status 1: /home/bstivers/Devel/python_stuff/snippets/.venv/bin/python /home/bstivers/Devel/python_stuff/snippets/.venv/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_wheel /tmp/tmp36qez7kz Check the logs for full command output.
at ~/.local/share/pypoetry/venv/lib/python3.8/site-packages/poetry/utils/env.py:1183 in _run
1179│ output = subprocess.check_output(
1180│ cmd, stderr=subprocess.STDOUT, **kwargs
1181│ )
1182│ except CalledProcessError as e:
→ 1183│ raise EnvCommandError(e, input=input_)
1184│
1185│ return decode(output)
1186│
1187│ def execute(self, bin, *args, **kwargs):
• Installing geopandas (0.10.2)
• Installing importlib-metadata (4.2.0)
• Installing ipywidgets (7.6.5)
• Installing matplotlib (3.5.0)
• Installing pynacl (1.4.0)
• Installing pyopenssl (20.0.1)
• Installing pyyaml (6.0)
• Installing requests (2.26.0)
• Installing scikit-fuzzy (0.4.2)
• Installing soupsieve (2.3.1)
• Installing toolz (0.11.2)
• Installing tqdm (4.62.3)
• Installing traittypes (0.2.1)
Failed to add packages, reverting the pyproject.toml file to its original content.
$ sudo apt-get install proj-bin
$ proj
Rel. 7.2.1, January 1st, 2021
$ sudo apt install libgeos++-dev libgeos-3.8.0 libgeos-c1v5 libgeos-dev libgeos-doc
Reading package lists... Done
Building dependency tree
Reading state information... Done
libgeos-3.8.0 is already the newest version (3.8.0-1build1).
libgeos++-dev is already the newest version (3.9.0-1~focal0).
libgeos-c1v5 is already the newest version (3.9.0-1~focal0).
libgeos-dev is already the newest version (3.9.0-1~focal0).
libgeos-doc is already the newest version (3.9.0-1~focal0).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Nope. Proj version 7.2.1 is installed, but cartopy requires at least version 8.0.0.
$ poetry add cartopy
Using version ^0.20.1 for Cartopy
Updating dependencies
Resolving dependencies... (0.9s)
Writing lock file
Package operations: 13 installs, 0 updates, 0 removals
• Installing pyparsing (3.0.6)
• Installing packaging (21.3)
• Installing certifi (2021.10.8)
• Installing cycler (0.11.0)
• Installing fonttools (4.28.3)
• Installing kiwisolver (1.3.2)
• Installing pillow (8.4.0)
• Installing setuptools-scm (6.3.2)
• Installing matplotlib (3.5.0)
• Installing pyproj (3.2.1)
• Installing pyshp (2.1.3)
• Installing shapely (1.8.0)
• Installing cartopy (0.20.1): Failed
EnvCommandError
Command ['/home/bstivers/Devel/python_stuff/snippets/.venv/bin/pip', 'install', '--no-deps', 'file:///home/bstivers/.cache/pypoetry/artifacts/65/e7/c8/4c2ca6b556680a35806b256956e1eea885af77617ad75afd28d588f87f/Cartopy-0.20.1.tar.gz'] errored with the following return code 1, and output:
Processing /home/bstivers/.cache/pypoetry/artifacts/65/e7/c8/4c2ca6b556680a35806b256956e1eea885af77617ad75afd28d588f87f/Cartopy-0.20.1.tar.gz
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /home/bstivers/Devel/python_stuff/snippets/.venv/bin/python /home/bstivers/Devel/python_stuff/snippets/.venv/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_wheel /tmp/tmpj349ru2k
cwd: /tmp/pip-req-build-adimzpxx
Complete output (1 lines):
Proj version 7.2.1 is installed, but cartopy requires at least version 8.0.0.
----------------------------------------
WARNING: Discarding file:///home/bstivers/.cache/pypoetry/artifacts/65/e7/c8/4c2ca6b556680a35806b256956e1eea885af77617ad75afd28d588f87f/Cartopy-0.20.1.tar.gz. Command errored out with exit status 1: /home/bstivers/Devel/python_stuff/snippets/.venv/bin/python /home/bstivers/Devel/python_stuff/snippets/.venv/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_wheel /tmp/tmpj349ru2k Check the logs for full command output.
ERROR: Command errored out with exit status 1: /home/bstivers/Devel/python_stuff/snippets/.venv/bin/python /home/bstivers/Devel/python_stuff/snippets/.venv/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_wheel /tmp/tmpj349ru2k Check the logs for full command output.
at ~/.local/share/pypoetry/venv/lib/python3.8/site-packages/poetry/utils/env.py:1183 in _run
1179│ output = subprocess.check_output(
1180│ cmd, stderr=subprocess.STDOUT, **kwargs
1181│ )
1182│ except CalledProcessError as e:
→ 1183│ raise EnvCommandError(e, input=input_)
1184│
1185│ return decode(output)
1186│
1187│ def execute(self, bin, *args, **kwargs):
Failed to add packages, reverting the pyproject.toml file to its original content.
Nope. fatal error: proj_api.h: No such file or directory
$ poetry add cartopy==0.19.0.post1
Updating dependencies
Resolving dependencies... (0.7s)
Package operations: 3 installs, 0 updates, 0 removals
• Installing pyshp (2.1.3)
• Installing shapely (1.8.0)
• Installing cartopy (0.19.0.post1): Failed
EnvCommandError
Command ['/home/bstivers/Devel/python_stuff/snippets/.venv/bin/pip', 'install', '--no-deps', 'file:///home/bstivers/.cache/pypoetry/artifacts/c5/2b/aa/11bbd53899dcd617e446bc633ba91d1bec77f6256145eb09e72f4d2fa6/Cartopy-0.19.0.post1.tar.gz'] errored with the following return code 1, and output:
Processing /home/bstivers/.cache/pypoetry/artifacts/c5/2b/aa/11bbd53899dcd617e446bc633ba91d1bec77f6256145eb09e72f4d2fa6/Cartopy-0.19.0.post1.tar.gz
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing metadata (pyproject.toml): started
Preparing metadata (pyproject.toml): finished with status 'done'
Building wheels for collected packages: Cartopy
Building wheel for Cartopy (pyproject.toml): started
Building wheel for Cartopy (pyproject.toml): finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /home/bstivers/Devel/python_stuff/snippets/.venv/bin/python /home/bstivers/Devel/python_stuff/snippets/.venv/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /tmp/tmp8otuwymc
cwd: /tmp/pip-req-build-p159gslp
Complete output (234 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.9
creating build/lib.linux-x86_64-3.9/cartopy
copying lib/cartopy/vector_transform.py -> build/lib.linux-x86_64-3.9/cartopy
copying lib/cartopy/util.py -> build/lib.linux-x86_64-3.9/cartopy
copying lib/cartopy/img_transform.py -> build/lib.linux-x86_64-3.9/cartopy
copying lib/cartopy/crs.py -> build/lib.linux-x86_64-3.9/cartopy
copying lib/cartopy/_version.py -> build/lib.linux-x86_64-3.9/cartopy
copying lib/cartopy/_epsg.py -> build/lib.linux-x86_64-3.9/cartopy
copying lib/cartopy/__init__.py -> build/lib.linux-x86_64-3.9/cartopy
creating build/lib.linux-x86_64-3.9/cartopy/tests
copying lib/cartopy/tests/test_vector_transform.py -> build/lib.linux-x86_64-3.9/cartopy/tests
copying lib/cartopy/tests/test_util.py -> build/lib.linux-x86_64-3.9/cartopy/tests
copying lib/cartopy/tests/test_shapereader.py -> build/lib.linux-x86_64-3.9/cartopy/tests
copying lib/cartopy/tests/test_polygon.py -> build/lib.linux-x86_64-3.9/cartopy/tests
copying lib/cartopy/tests/test_linear_ring.py -> build/lib.linux-x86_64-3.9/cartopy/tests
copying lib/cartopy/tests/test_line_string.py -> build/lib.linux-x86_64-3.9/cartopy/tests
copying lib/cartopy/tests/test_img_transform.py -> build/lib.linux-x86_64-3.9/cartopy/tests
copying lib/cartopy/tests/test_img_tiles.py -> build/lib.linux-x86_64-3.9/cartopy/tests
copying lib/cartopy/tests/test_img_nest.py -> build/lib.linux-x86_64-3.9/cartopy/tests
copying lib/cartopy/tests/test_geodesic.py -> build/lib.linux-x86_64-3.9/cartopy/tests
copying lib/cartopy/tests/test_features.py -> build/lib.linux-x86_64-3.9/cartopy/tests
copying lib/cartopy/tests/test_crs_transform_vectors.py -> build/lib.linux-x86_64-3.9/cartopy/tests
copying lib/cartopy/tests/test_crs.py -> build/lib.linux-x86_64-3.9/cartopy/tests
copying lib/cartopy/tests/test_coding_standards.py -> build/lib.linux-x86_64-3.9/cartopy/tests
copying lib/cartopy/tests/test_coastline.py -> build/lib.linux-x86_64-3.9/cartopy/tests
copying lib/cartopy/tests/conftest.py -> build/lib.linux-x86_64-3.9/cartopy/tests
copying lib/cartopy/tests/__init__.py -> build/lib.linux-x86_64-3.9/cartopy/tests
creating build/lib.linux-x86_64-3.9/cartopy/sphinxext
copying lib/cartopy/sphinxext/summarise_package.py -> build/lib.linux-x86_64-3.9/cartopy/sphinxext
copying lib/cartopy/sphinxext/__init__.py -> build/lib.linux-x86_64-3.9/cartopy/sphinxext
creating build/lib.linux-x86_64-3.9/cartopy/mpl
copying lib/cartopy/mpl/ticker.py -> build/lib.linux-x86_64-3.9/cartopy/mpl
copying lib/cartopy/mpl/style.py -> build/lib.linux-x86_64-3.9/cartopy/mpl
copying lib/cartopy/mpl/slippy_image_artist.py -> build/lib.linux-x86_64-3.9/cartopy/mpl
copying lib/cartopy/mpl/patch.py -> build/lib.linux-x86_64-3.9/cartopy/mpl
copying lib/cartopy/mpl/gridliner.py -> build/lib.linux-x86_64-3.9/cartopy/mpl
copying lib/cartopy/mpl/geocollection.py -> build/lib.linux-x86_64-3.9/cartopy/mpl
copying lib/cartopy/mpl/geoaxes.py -> build/lib.linux-x86_64-3.9/cartopy/mpl
copying lib/cartopy/mpl/feature_artist.py -> build/lib.linux-x86_64-3.9/cartopy/mpl
copying lib/cartopy/mpl/contour.py -> build/lib.linux-x86_64-3.9/cartopy/mpl
copying lib/cartopy/mpl/clip_path.py -> build/lib.linux-x86_64-3.9/cartopy/mpl
copying lib/cartopy/mpl/__init__.py -> build/lib.linux-x86_64-3.9/cartopy/mpl
creating build/lib.linux-x86_64-3.9/cartopy/io
copying lib/cartopy/io/srtm.py -> build/lib.linux-x86_64-3.9/cartopy/io
copying lib/cartopy/io/shapereader.py -> build/lib.linux-x86_64-3.9/cartopy/io
copying lib/cartopy/io/ogc_clients.py -> build/lib.linux-x86_64-3.9/cartopy/io
copying lib/cartopy/io/img_tiles.py -> build/lib.linux-x86_64-3.9/cartopy/io
copying lib/cartopy/io/img_nest.py -> build/lib.linux-x86_64-3.9/cartopy/io
copying lib/cartopy/io/__init__.py -> build/lib.linux-x86_64-3.9/cartopy/io
creating build/lib.linux-x86_64-3.9/cartopy/geodesic
copying lib/cartopy/geodesic/__init__.py -> build/lib.linux-x86_64-3.9/cartopy/geodesic
creating build/lib.linux-x86_64-3.9/cartopy/feature
copying lib/cartopy/feature/nightshade.py -> build/lib.linux-x86_64-3.9/cartopy/feature
copying lib/cartopy/feature/__init__.py -> build/lib.linux-x86_64-3.9/cartopy/feature
creating build/lib.linux-x86_64-3.9/cartopy/tests/mpl
copying lib/cartopy/tests/mpl/test_web_services.py -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl
copying lib/cartopy/tests/mpl/test_ticks.py -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl
copying lib/cartopy/tests/mpl/test_ticker.py -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl
copying lib/cartopy/tests/mpl/test_style.py -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl
copying lib/cartopy/tests/mpl/test_shapely_to_mpl.py -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl
copying lib/cartopy/tests/mpl/test_set_extent.py -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl
copying lib/cartopy/tests/mpl/test_quiver.py -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl
copying lib/cartopy/tests/mpl/test_pseudo_color.py -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl
copying lib/cartopy/tests/mpl/test_plots.py -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl
copying lib/cartopy/tests/mpl/test_patch.py -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl
copying lib/cartopy/tests/mpl/test_nightshade.py -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl
copying lib/cartopy/tests/mpl/test_mpl_integration.py -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl
copying lib/cartopy/tests/mpl/test_img_transform.py -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl
copying lib/cartopy/tests/mpl/test_images.py -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl
copying lib/cartopy/tests/mpl/test_gridliner.py -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl
copying lib/cartopy/tests/mpl/test_features.py -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl
copying lib/cartopy/tests/mpl/test_feature_artist.py -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl
copying lib/cartopy/tests/mpl/test_examples.py -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl
copying lib/cartopy/tests/mpl/test_crs.py -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl
copying lib/cartopy/tests/mpl/test_contour.py -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl
copying lib/cartopy/tests/mpl/test_caching.py -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl
copying lib/cartopy/tests/mpl/test_axes.py -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl
copying lib/cartopy/tests/mpl/conftest.py -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl
copying lib/cartopy/tests/mpl/__init__.py -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl
creating build/lib.linux-x86_64-3.9/cartopy/tests/io
copying lib/cartopy/tests/io/test_srtm.py -> build/lib.linux-x86_64-3.9/cartopy/tests/io
copying lib/cartopy/tests/io/test_ogc_clients.py -> build/lib.linux-x86_64-3.9/cartopy/tests/io
copying lib/cartopy/tests/io/test_downloaders.py -> build/lib.linux-x86_64-3.9/cartopy/tests/io
copying lib/cartopy/tests/io/__init__.py -> build/lib.linux-x86_64-3.9/cartopy/tests/io
creating build/lib.linux-x86_64-3.9/cartopy/tests/feature
copying lib/cartopy/tests/feature/test_nightshade.py -> build/lib.linux-x86_64-3.9/cartopy/tests/feature
copying lib/cartopy/tests/feature/__init__.py -> build/lib.linux-x86_64-3.9/cartopy/tests/feature
creating build/lib.linux-x86_64-3.9/cartopy/tests/crs
copying lib/cartopy/tests/crs/test_utm.py -> build/lib.linux-x86_64-3.9/cartopy/tests/crs
copying lib/cartopy/tests/crs/test_transverse_mercator.py -> build/lib.linux-x86_64-3.9/cartopy/tests/crs
copying lib/cartopy/tests/crs/test_stereographic.py -> build/lib.linux-x86_64-3.9/cartopy/tests/crs
copying lib/cartopy/tests/crs/test_sinusoidal.py -> build/lib.linux-x86_64-3.9/cartopy/tests/crs
copying lib/cartopy/tests/crs/test_rotated_pole.py -> build/lib.linux-x86_64-3.9/cartopy/tests/crs
copying lib/cartopy/tests/crs/test_rotated_geodetic.py -> build/lib.linux-x86_64-3.9/cartopy/tests/crs
copying lib/cartopy/tests/crs/test_robinson.py -> build/lib.linux-x86_64-3.9/cartopy/tests/crs
copying lib/cartopy/tests/crs/test_orthographic.py -> build/lib.linux-x86_64-3.9/cartopy/tests/crs
copying lib/cartopy/tests/crs/test_nearside_perspective.py -> build/lib.linux-x86_64-3.9/cartopy/tests/crs
copying lib/cartopy/tests/crs/test_mollweide.py -> build/lib.linux-x86_64-3.9/cartopy/tests/crs
copying lib/cartopy/tests/crs/test_miller.py -> build/lib.linux-x86_64-3.9/cartopy/tests/crs
copying lib/cartopy/tests/crs/test_mercator.py -> build/lib.linux-x86_64-3.9/cartopy/tests/crs
copying lib/cartopy/tests/crs/test_lambert_conformal.py -> build/lib.linux-x86_64-3.9/cartopy/tests/crs
copying lib/cartopy/tests/crs/test_lambert_azimuthal_equal_area.py -> build/lib.linux-x86_64-3.9/cartopy/tests/crs
copying lib/cartopy/tests/crs/test_interrupted_goode_homolosine.py -> build/lib.linux-x86_64-3.9/cartopy/tests/crs
copying lib/cartopy/tests/crs/test_gnomonic.py -> build/lib.linux-x86_64-3.9/cartopy/tests/crs
copying lib/cartopy/tests/crs/test_geostationary.py -> build/lib.linux-x86_64-3.9/cartopy/tests/crs
copying lib/cartopy/tests/crs/test_equidistant_conic.py -> build/lib.linux-x86_64-3.9/cartopy/tests/crs
copying lib/cartopy/tests/crs/test_equal_earth.py -> build/lib.linux-x86_64-3.9/cartopy/tests/crs
copying lib/cartopy/tests/crs/test_eckert.py -> build/lib.linux-x86_64-3.9/cartopy/tests/crs
copying lib/cartopy/tests/crs/test_azimuthal_equidistant.py -> build/lib.linux-x86_64-3.9/cartopy/tests/crs
copying lib/cartopy/tests/crs/test_albers_equal_area.py -> build/lib.linux-x86_64-3.9/cartopy/tests/crs
copying lib/cartopy/tests/crs/helpers.py -> build/lib.linux-x86_64-3.9/cartopy/tests/crs
copying lib/cartopy/tests/crs/__init__.py -> build/lib.linux-x86_64-3.9/cartopy/tests/crs
creating build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images
creating build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl
creating build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_web_services
copying lib/cartopy/tests/mpl/baseline_images/mpl/test_web_services/wmts.png -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_web_services
copying lib/cartopy/tests/mpl/baseline_images/mpl/test_web_services/wms.png -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_web_services
creating build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_ticks
copying lib/cartopy/tests/mpl/baseline_images/mpl/test_ticks/yticks_no_transform.png -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_ticks
copying lib/cartopy/tests/mpl/baseline_images/mpl/test_ticks/yticks_cylindrical.png -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_ticks
copying lib/cartopy/tests/mpl/baseline_images/mpl/test_ticks/xyticks.png -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_ticks
copying lib/cartopy/tests/mpl/baseline_images/mpl/test_ticks/xticks_no_transform.png -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_ticks
copying lib/cartopy/tests/mpl/baseline_images/mpl/test_ticks/xticks_cylindrical.png -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_ticks
creating build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_shapely_to_mpl
copying lib/cartopy/tests/mpl/baseline_images/mpl/test_shapely_to_mpl/poly_interiors.png -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_shapely_to_mpl
copying lib/cartopy/tests/mpl/baseline_images/mpl/test_shapely_to_mpl/contour_with_interiors.png -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_shapely_to_mpl
creating build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_nightshade
copying lib/cartopy/tests/mpl/baseline_images/mpl/test_nightshade/nightshade_platecarree.png -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_nightshade
creating build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_mpl_integration
copying lib/cartopy/tests/mpl/baseline_images/mpl/test_mpl_integration/streamplot_mpl_3.2.0.png -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_mpl_integration
copying lib/cartopy/tests/mpl/baseline_images/mpl/test_mpl_integration/streamplot_mpl_3.0.0.png -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_mpl_integration
copying lib/cartopy/tests/mpl/baseline_images/mpl/test_mpl_integration/streamplot_mpl_2.2.2.png -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_mpl_integration
copying lib/cartopy/tests/mpl/baseline_images/mpl/test_mpl_integration/simple_global.png -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_mpl_integration
copying lib/cartopy/tests/mpl/baseline_images/mpl/test_mpl_integration/quiver_rotated_pole.png -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_mpl_integration
copying lib/cartopy/tests/mpl/baseline_images/mpl/test_mpl_integration/quiver_regrid_with_extent.png -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_mpl_integration
copying lib/cartopy/tests/mpl/baseline_images/mpl/test_mpl_integration/quiver_regrid.png -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_mpl_integration
copying lib/cartopy/tests/mpl/baseline_images/mpl/test_mpl_integration/quiver_plate_carree.png -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_mpl_integration
copying lib/cartopy/tests/mpl/baseline_images/mpl/test_mpl_integration/pcolormesh_single_column_wrap.png -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_mpl_integration
copying lib/cartopy/tests/mpl/baseline_images/mpl/test_mpl_integration/pcolormesh_mercator_wrap.png -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_mpl_integration
copying lib/cartopy/tests/mpl/baseline_images/mpl/test_mpl_integration/pcolormesh_limited_area_wrap.png -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_mpl_integration
copying lib/cartopy/tests/mpl/baseline_images/mpl/test_mpl_integration/pcolormesh_goode_wrap.png -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_mpl_integration
copying lib/cartopy/tests/mpl/baseline_images/mpl/test_mpl_integration/pcolormesh_global_wrap3.png -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_mpl_integration
copying lib/cartopy/tests/mpl/baseline_images/mpl/test_mpl_integration/pcolormesh_global_wrap2.png -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_mpl_integration
copying lib/cartopy/tests/mpl/baseline_images/mpl/test_mpl_integration/pcolormesh_global_wrap1.png -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_mpl_integration
copying lib/cartopy/tests/mpl/baseline_images/mpl/test_mpl_integration/natural_earth_interface.png -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_mpl_integration
copying lib/cartopy/tests/mpl/baseline_images/mpl/test_mpl_integration/multiple_projections520.png -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_mpl_integration
copying lib/cartopy/tests/mpl/baseline_images/mpl/test_mpl_integration/multiple_projections5.png -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_mpl_integration
copying lib/cartopy/tests/mpl/baseline_images/mpl/test_mpl_integration/multiple_projections4.png -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_mpl_integration
copying lib/cartopy/tests/mpl/baseline_images/mpl/test_mpl_integration/global_scatter_wrap.png -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_mpl_integration
copying lib/cartopy/tests/mpl/baseline_images/mpl/test_mpl_integration/global_pcolor_wrap.png -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_mpl_integration
copying lib/cartopy/tests/mpl/baseline_images/mpl/test_mpl_integration/global_map.png -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_mpl_integration
copying lib/cartopy/tests/mpl/baseline_images/mpl/test_mpl_integration/global_hexbin_wrap.png -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_mpl_integration
copying lib/cartopy/tests/mpl/baseline_images/mpl/test_mpl_integration/global_contourf_wrap.png -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_mpl_integration
copying lib/cartopy/tests/mpl/baseline_images/mpl/test_mpl_integration/global_contour_wrap_mpl_pre_3.0.0.png -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_mpl_integration
copying lib/cartopy/tests/mpl/baseline_images/mpl/test_mpl_integration/global_contour_wrap.png -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_mpl_integration
copying lib/cartopy/tests/mpl/baseline_images/mpl/test_mpl_integration/barbs_regrid_with_extent.png -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_mpl_integration
copying lib/cartopy/tests/mpl/baseline_images/mpl/test_mpl_integration/barbs_regrid.png -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_mpl_integration
copying lib/cartopy/tests/mpl/baseline_images/mpl/test_mpl_integration/barbs_plate_carree.png -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_mpl_integration
copying lib/cartopy/tests/mpl/baseline_images/mpl/test_mpl_integration/barbs_1d_transformed.png -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_mpl_integration
copying lib/cartopy/tests/mpl/baseline_images/mpl/test_mpl_integration/barbs_1d.png -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_mpl_integration
creating build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_img_transform
copying lib/cartopy/tests/mpl/baseline_images/mpl/test_img_transform/regrid_image.png -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_img_transform
creating build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_img_tiles2
copying lib/cartopy/tests/mpl/baseline_images/mpl/test_img_tiles2/web_tiles.png -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_img_tiles2
creating build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_images
copying lib/cartopy/tests/mpl/baseline_images/mpl/test_images/web_tiles.png -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_images
copying lib/cartopy/tests/mpl/baseline_images/mpl/test_images/imshow_regional_projected.png -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_images
copying lib/cartopy/tests/mpl/baseline_images/mpl/test_images/imshow_natural_earth_ortho.png -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_images
copying lib/cartopy/tests/mpl/baseline_images/mpl/test_images/image_nest.png -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_images
copying lib/cartopy/tests/mpl/baseline_images/mpl/test_images/image_merge.png -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_images
creating build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_gridliner
copying lib/cartopy/tests/mpl/baseline_images/mpl/test_gridliner/gridliner_labels_tight.png -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_gridliner
copying lib/cartopy/tests/mpl/baseline_images/mpl/test_gridliner/gridliner_labels_inline_usa.png -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_gridliner
copying lib/cartopy/tests/mpl/baseline_images/mpl/test_gridliner/gridliner_labels_inline.png -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_gridliner
copying lib/cartopy/tests/mpl/baseline_images/mpl/test_gridliner/gridliner_labels_bbox_style.png -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_gridliner
copying lib/cartopy/tests/mpl/baseline_images/mpl/test_gridliner/gridliner_labels.png -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_gridliner
copying lib/cartopy/tests/mpl/baseline_images/mpl/test_gridliner/gridliner1.png -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_gridliner
creating build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_features
copying lib/cartopy/tests/mpl/baseline_images/mpl/test_features/wfs.png -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_features
copying lib/cartopy/tests/mpl/baseline_images/mpl/test_features/natural_earth_custom.png -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_features
copying lib/cartopy/tests/mpl/baseline_images/mpl/test_features/natural_earth.png -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_features
copying lib/cartopy/tests/mpl/baseline_images/mpl/test_features/gshhs_coastlines.png -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_features
creating build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_examples
copying lib/cartopy/tests/mpl/baseline_images/mpl/test_examples/global_map.png -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_examples
copying lib/cartopy/tests/mpl/baseline_images/mpl/test_examples/contour_label_3.4.png -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_examples
copying lib/cartopy/tests/mpl/baseline_images/mpl/test_examples/contour_label.png -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_examples
creating build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_crs
copying lib/cartopy/tests/mpl/baseline_images/mpl/test_crs/mercator_squashed.png -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_crs
copying lib/cartopy/tests/mpl/baseline_images/mpl/test_crs/lambert_conformal_south.png -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_crs
creating build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_axes
copying lib/cartopy/tests/mpl/baseline_images/mpl/test_axes/geoaxes_subslice.png -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_axes
copying lib/cartopy/tests/mpl/baseline_images/mpl/test_axes/geoaxes_set_boundary_clipping.png -> build/lib.linux-x86_64-3.9/cartopy/tests/mpl/baseline_images/mpl/test_axes
creating build/lib.linux-x86_64-3.9/cartopy/data
creating build/lib.linux-x86_64-3.9/cartopy/data/raster
creating build/lib.linux-x86_64-3.9/cartopy/data/raster/sample
copying lib/cartopy/data/raster/sample/Miriam.A2012270.2050.2km.jpg -> build/lib.linux-x86_64-3.9/cartopy/data/raster/sample
copying lib/cartopy/data/raster/sample/Miriam.A2012270.2050.2km.README.txt -> build/lib.linux-x86_64-3.9/cartopy/data/raster/sample
creating build/lib.linux-x86_64-3.9/cartopy/data/raster/natural_earth
copying lib/cartopy/data/raster/natural_earth/images.json -> build/lib.linux-x86_64-3.9/cartopy/data/raster/natural_earth
copying lib/cartopy/data/raster/natural_earth/50-natural-earth-1-downsampled.png -> build/lib.linux-x86_64-3.9/cartopy/data/raster/natural_earth
creating build/lib.linux-x86_64-3.9/cartopy/data/netcdf
copying lib/cartopy/data/netcdf/HadISST1_SST_update.nc -> build/lib.linux-x86_64-3.9/cartopy/data/netcdf
copying lib/cartopy/data/netcdf/HadISST1_SST_update.README.txt -> build/lib.linux-x86_64-3.9/cartopy/data/netcdf
creating build/lib.linux-x86_64-3.9/cartopy/data/shapefiles
creating build/lib.linux-x86_64-3.9/cartopy/data/shapefiles/gshhs
copying lib/cartopy/data/shapefiles/gshhs/README.TXT -> build/lib.linux-x86_64-3.9/cartopy/data/shapefiles/gshhs
creating build/lib.linux-x86_64-3.9/cartopy/data/shapefiles/gshhs/l
copying lib/cartopy/data/shapefiles/gshhs/l/GSHHS_l_L2.shx -> build/lib.linux-x86_64-3.9/cartopy/data/shapefiles/gshhs/l
copying lib/cartopy/data/shapefiles/gshhs/l/GSHHS_l_L2.shp -> build/lib.linux-x86_64-3.9/cartopy/data/shapefiles/gshhs/l
copying lib/cartopy/data/shapefiles/gshhs/l/GSHHS_l_L2.dbf -> build/lib.linux-x86_64-3.9/cartopy/data/shapefiles/gshhs/l
creating build/lib.linux-x86_64-3.9/cartopy/data/shapefiles/gshhs/c
copying lib/cartopy/data/shapefiles/gshhs/c/GSHHS_c_L1.shx -> build/lib.linux-x86_64-3.9/cartopy/data/shapefiles/gshhs/c
copying lib/cartopy/data/shapefiles/gshhs/c/GSHHS_c_L1.shp -> build/lib.linux-x86_64-3.9/cartopy/data/shapefiles/gshhs/c
copying lib/cartopy/data/shapefiles/gshhs/c/GSHHS_c_L1.dbf -> build/lib.linux-x86_64-3.9/cartopy/data/shapefiles/gshhs/c
creating build/lib.linux-x86_64-3.9/cartopy/tests/lakes_shapefile
copying lib/cartopy/tests/lakes_shapefile/ne_110m_lakes.shx -> build/lib.linux-x86_64-3.9/cartopy/tests/lakes_shapefile
copying lib/cartopy/tests/lakes_shapefile/ne_110m_lakes.shp -> build/lib.linux-x86_64-3.9/cartopy/tests/lakes_shapefile
copying lib/cartopy/tests/lakes_shapefile/ne_110m_lakes.dbf -> build/lib.linux-x86_64-3.9/cartopy/tests/lakes_shapefile
copying lib/cartopy/io/srtm.npz -> build/lib.linux-x86_64-3.9/cartopy/io
running build_ext
building 'cartopy.trace' extension
creating build/temp.linux-x86_64-3.9
creating build/temp.linux-x86_64-3.9/lib
creating build/temp.linux-x86_64-3.9/lib/cartopy
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DACCEPT_USE_OF_DEPRECATED_PROJ_API_H=1 -I/home/bstivers/.pyenv/versions/3.9.9/include -I./lib/cartopy -I/tmp/pip-build-env-mvxvn1l4/overlay/lib/python3.9/site-packages/numpy/core/include -I/usr/include -I/home/bstivers/Devel/python_stuff/snippets/.venv/include -I/home/bstivers/.pyenv/versions/3.9.9/include/python3.9 -c lib/cartopy/trace.cpp -o build/temp.linux-x86_64-3.9/lib/cartopy/trace.o
lib/cartopy/trace.cpp:634:10: fatal error: proj_api.h: No such file or directory
634 | #include "proj_api.h"
| ^~~~~~~~~~~~
compilation terminated.
error: command '/usr/bin/gcc' failed with exit code 1
----------------------------------------
ERROR: Failed building wheel for Cartopy
Failed to build Cartopy
ERROR: Could not build wheels for Cartopy, which is required to install pyproject.toml-based projects
at ~/.local/share/pypoetry/venv/lib/python3.8/site-packages/poetry/utils/env.py:1183 in _run
1179│ output = subprocess.check_output(
1180│ cmd, stderr=subprocess.STDOUT, **kwargs
1181│ )
1182│ except CalledProcessError as e:
→ 1183│ raise EnvCommandError(e, input=input_)
1184│
1185│ return decode(output)
1186│
1187│ def execute(self, bin, *args, **kwargs):
Failed to add packages, reverting the pyproject.toml file to its original content.
Wait, there it is.
$ sudo apt-get install libproj-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
libproj-dev is already the newest version (7.2.1-1~focal0).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
$ poetry add cartopy==0.19.0.post1
Updating dependencies
Resolving dependencies... (1.0s)
Writing lock file
Package operations: 3 installs, 0 updates, 0 removals
• Installing pyshp (2.1.3)
• Installing shapely (1.8.0)
• Installing cartopy (0.19.0.post1)
NOTE_TO_SELF: Pretty sure it's time to start using conda. LOL
@bstivers why would you nuke an informative thread with 5 screens of your debug logs?...
For anyone having problems with pip installing cartopy==0.19.0.post1
in a Python 3.10 venv on Ubuntu 20.04, I tried the following and it worked :
sudo apt install python3-dev libproj-dev proj-data proj-bin libgeos-dev
# If using Python 3.x, consider installing python3.x-dev
sudo apt install python3.10-dev
# Activate venv
source venv/bin/activate
pip3 install cartopy==0.19.0.post1
The python3.x-dev
was needed in order to solve this error message :
lib/cartopy/trace.cpp:6:10: fatal error: Python.h: No such file or directory
6 | #include "Python.h"
| ^~~~~~~~~~
compilation terminated.
error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
----------------------------------------
ERROR: Failed building wheel for cartopy
is there any solutions for this error in macbook, i am facing exactly this but in macbook?
Description
I am trying to install cartopy with python 3.5.2 in a virtualenv (on Ubuntu 16.04.5) with the following command:
pip3 install cartopy
The
pip3
is used from the virtualenv correctly.pip freeze
:I get the following error (warning! entire output!):