-
Notifications
You must be signed in to change notification settings - Fork 364
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
pip install of cartopy 0.18.0 fails when installing numpy at the same time #1552
Comments
This is because |
Peanut gallery here. What's the issue with just having |
@akrherz That's a great idea, which is why
|
I just ran into this problem too.
What was the motivation behind this change? It makes it quite challenging to use cartopy with projects that use poetry. |
@dopplershift if the version in Also a set of manylinux,macos and windows abi3 binary wheel would solve this for most users |
I don't think it's so much an end-user issues as a developer one. If I install numpy 1.16 to test, I want cartopy to build against it. And if I've already installed numpy from conda, I sure as hell don't want it downloading something from pypi--especially an sdist. See #1264 (comment) and the surrounding discussion. |
@dopplershift this will be fine if the build-system and install_requires numpy version ranges match, and span only a single numpy ABI. pip 20.4 will uninstall cartopy and install one with a compatible numpy version. In fact you wouldn't even need a build time dep on numpy as you could include the .h files for the numpy ABI you supported in your sdist |
Might be worth giving |
Thanks for the explanation. It sounds like it is important to test against specific versions of numpy, and that you don't find pip This issues matters because "serverless" cloud python runtimes like AWS lambda and Google Cloud dataflow tend to support pip but not anaconda. Also, IMO anaconda has fallen a bit behind the curve in terms of dependency locking and other features that tools like poetry and pipenv provide. |
IMO, because poetry/pipenv rely on Python's wheel standard, they're not as good for the scientific stack--they have no way to package non-Python dependencies. This causes problems where Shapely then builds and links to one copy of GEOS, and CartoPy links to another; if you try to then import those packages in the same script: BOOM. You don't have that problem with Anaconda because you just 'conda install geos` and those other packages depend on it. At any rate, I'm not against trying to fix it. If someone contributes a |
I totally agree about the difficulties with pip and non-python dependencies. Unfortunately, I don't think conda has kept up with some of the innovations of the broader community around lockfiles/deterministic builds and project management. I would rather use two package managers (apt-get for system libraries) and pip/poetry/pipenv for python dependencies than sacrifice determinism. At any rate, I don't think it should be too hard to make cartopy PEP-517 compliant. |
How often does numpy break ABI?
…On Wed, 18 Nov 2020, 22:54 Noah D Brenowitz, ***@***.***> wrote:
I totally agree about the difficulties with pip and non-python
dependencies. Unfortunately, I don't think conda has kept up with some of
the innovations of the broader community around lockfiles/deterministic
builds and project management. I would rather use two package managers
(apt-get for system libraries) and pip/poetry/pipenv for python
dependencies than sacrifice determinism. conda install cartopy xarray
fsspec scikit-learn zarr is great, but put that in a CI system and
eventually some dependency update will break the build. In my experience
with this stack, this happens about twice a month and takes 30+ minutes to
debug each time. I would much rather spend 10 minutes up-front writing a
dockerfile/shell script with poetry +apt-get if it is possible to achieve a
deterministic build.
At any rate, I don't think it should be too hard to make cartopy PEP-517
compliant.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1552 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADFATAE4CYNLEBAIJCFY5TSQRGDDANCNFSM4M2QEKLA>
.
|
Check out the draft PR I just opened (#1680). It shows that you can control the installed numpy by switching to |
Thanks for sending in the PR--I'll check it out when I have a chance to sit down more fully on some cartopy work. Regarding CI stuff: oh I'm well aware. I'm maintaining plenty of CI setups and the breakage caused in both PyPI and Conda stacks is exceedingly irritating, to the point where I recently rewrote one to make significant use of Dependabot. The difference for me is that I'm unwilling to deal with getting GDAL, GEOS, PROJ, netCDF, etc. installed and built consistently on Windows, so I rely on conda there--therefore my CI solution had to work with both ( |
Description
I am provisioning a docker image using pip. In a single pip command, I installed a number of packages, including cartopy and numpy. This worked in versions prior to 0.18.0, and no longer works with 0.18.0.
Code to reproduce
In a docker image with vanilla python3 install and no pip packages installed, run
Traceback
Full environment definition
Operating system
Ubuntu 18.04
Python 3.7.6 installed via pyenv
Cartopy version
0.18.0
The text was updated successfully, but these errors were encountered: