-
Notifications
You must be signed in to change notification settings - Fork 361
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to install cartopy with pip3 #1239
Comments
You need to install GEOS devel package; please ensure you have installed everything in the requirements. |
I did a
|
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 |
Is it necessary to install GEOS devel package? In my case, I have just
It produces an image of Europe. I have installed latest GEOS (3.7.0) using
What could be going on? |
With the geos devel installed, and doing
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
<#1239 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AMbr8ykGo4GfDiqV87JXaN-sfwONbctzks5u3f9ggaJpZM4ZH-Kx>
.
|
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
<#1239 (comment)>,
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 ***@***.***> 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
> <#1239 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AMbr83QPlnUJitdP4-pRuuNI8U7hHBuFks5u3grogaJpZM4ZH-Kx>
> .
>
|
|
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
<#1239 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AMbr82V0tX5Vje-QBcMtsYhzz877ddYeks5u3hASgaJpZM4ZH-Kx>
.
|
Ok thanks. I installed
But when I try to import it of course it does not work:
Maybe I better give up? Seems that project |
@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.
@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
|
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 <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
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1239 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AMbr89-PUm5rg3Vp5aeuHgoIDezm_lEhks5u3hrugaJpZM4ZH-Kx>
.
|
|
@Sim4n6 : I suggest to update the installation documentation. Also, I am trying to use that package on Ubuntu 16.04.5 ... |
|
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
<#1239 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AMbr8-F9j3M5n7G0DZqR9E59PMY1zPawks5u3h02gaJpZM4ZH-Kx>
.
|
When I remove everything related to 'proj':
|
Apologies for the misunderstanding... |
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:
Where pip is the package manager of your virtualenv. |
cartopy supports to run on windows? |
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
Now, it works like a charm. I hope the |
I am still facing this issue.
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. |
Nevermind, cannot reproduce.
^ this is exactly what I would expect. Instead I got 300 lines of gcc logs ending with
I'll dig more and try to reproduce this |
Well, if you install with |
As per title, will not install on vanilla Ubuntu 20 LTS:
Errors out:
Have tried installing dev-versions of all obvious libraries including 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:
It will run into the issue with cartopy 20.X and then attempt to install lower version numbers eventually settling at |
@Demetrio92 First, thanks for taking the time. Appreciated.
All returned
What gives? |
@Friptick this is expected. However, pip should proceed with trying to install 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 |
I just ran into this using 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 Backstory on how I troubleshot itHow 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" Attempt to install only
|
@bstivers why would you nuke an informative thread with 5 screens of your debug logs?... |
For anyone having problems with pip installing 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
|
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!):
The text was updated successfully, but these errors were encountered: