cartopy icon indicating copy to clipboard operation
cartopy copied to clipboard

Cartopy now requires Proj version 8.0.0 but webpage says only needs 4.9.0

Open bismurphy opened this issue 3 years ago • 11 comments

This appears to be a result of the very recent latest release.

Attempting to install Cartopy on my machine says Proj version 6.3.1 is installed, but cartopy requires at least version 8.0.0.

Contrarily, https://scitools.org.uk/cartopy/docs/latest/installing.html#installing indicates Proj only needs to be 4.9.0 or better. I'm struggling to get my Proj to version 8.0.0, but that's a separate issue from Cartopy.

Would it be possible to make the 8.0.0 Proj optional? It appears to only be used for one particular feature.

bismurphy avatar Sep 17 '21 14:09 bismurphy

The reason the docs still say Proj 4.9 is because those docs are for 0.19. We are waiting on SciTools/scitools.org.uk#245 to get merged to get the 0.20 docs posted, which should be correct.

With regards to making 8.0 optional, I believe there were reasons in #1808 that we needed to move beyond Proj 6.3. @snowman2 can you add anything about that?

dopplershift avatar Sep 17 '21 19:09 dopplershift

@dopplershift, the error comes from the setup.py which is only used for the geodesic stuff. There really isn't any reason that the pin should be 8.0.0 in the setup,py. All of the stuff from pyproj that requires PROJ 8+ could be installed via the pyproj wheels. Looks like the move in the pin happened in #1854.

snowman2 avatar Sep 17 '21 20:09 snowman2

There really isn't any reason that the pin should be 8.0.0 in the setup,py

Actually, I take that back. This setup has the potential to be unstable and isn't tested in the cartopy CI tests, so the pin at PROJ 8+ makes sense for now.

snowman2 avatar Sep 17 '21 20:09 snowman2

This is, however, a bit problematic, since it makes 0.20.0 unusable on Debian distros if one does not want to install proj from source. ... And most people (me included) prefer apt or something similar and this does not gove proj8.

MHBalsmeier avatar Sep 17 '21 20:09 MHBalsmeier

Once #1832 is resolved, this shouldn't be an issue (assuming you don't mind using the pyproj wheels).

snowman2 avatar Sep 17 '21 20:09 snowman2

Once #1832 is resolved, this shouldn't be an issue (assuming you don't mind using the pyproj wheels).

I don't, but most people don't install by cloning the current repository but rather by installing the PyPi release with pip.

MHBalsmeier avatar Sep 21 '21 07:09 MHBalsmeier

Forgive me if this is not the right thread for that but, in line with previous questions, I was wondering whether it would be possible to make cartopy a little more backward compatible and extend support for proj < 8 in order to make life easier for LTS users that are still using 6 something? Or did the previous message mean that cartopy will soon automatically install the right pyproj when installed from pip and that this would also work on old LTS because the .so file would be included in pyproj?

tfardet avatar Oct 13 '21 08:10 tfardet

I was wondering whether it would be possible to make cartopy a little more backward compatible and extend support for proj < 8 in order to make life easier for LTS users that are still using 6 something?

If someone wants to try to figure out how to get cartooy working with earlier versions of PROJ and submit a PR, I bet the change would be welcome. The tests failed with earlier versions, so we opted to move the PROJ pin for now.

snowman2 avatar Oct 13 '21 12:10 snowman2

Supporting a slightly earlier version of libproj would be very welcome.

  • Debian bullseye and Ubuntu 21.10 both ship libproj 7.2.1.

riddella avatar Nov 11 '21 21:11 riddella

I see that the issue is still open yet. But is there any workaround possible ? Thanks

RaviBeagle avatar Mar 31 '22 14:03 RaviBeagle

@RaviBeagle The workaround appears to be to install Proj from source. I got a working script here for one specific Docker image. It's Dockerfile, not strictly bash, and may need to be tweaked a bit for other versions of Ubuntu or Proj/Cartopy, but it should be close to what most folks need.

SMesser avatar Apr 08 '22 16:04 SMesser

v0.21 is out and there is no longer a minimum required PROJ. All PROJ requirements are handled by pyproj now.

greglucas avatar Sep 11 '22 02:09 greglucas