-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
Installing Cartopy on linux / docker build fails on import - ImportError: libproj.so.19: cannot open shared object file: No such file or directory #93
Comments
@lwasser, it looks like you might be trying to use the base environment, rather than creating another environment and calling |
You definitely want to use
Same here. I'm pretty sure about the problem being not calling |
@xylar thank you. can you help me understand how i'd access / install libgeos from the conda envt? i thought it is a system based install. we are definitely installing everything into the base envt and that has worked for us for the past few years well. i just tried conda activate and then launched Python via the CLI in the image and i'm still getting the same error. could the order matter? should i try to install libgeos and proj before updating the base conda envt? and can you kindly give me an example of setting the proj_lib variable? thank you. |
and the proj4 install returned this - i stopped it as it was trying to resolve for about an hour.
|
The package is no longer called It's good that the
The fact that
No, I am quite sure the order of installing packages doesn't matter. You don't want to be installing the packages with Ideally, you might want to switch to creating the whole conda environment in one go with Could you also list the |
I don't have much to add on what @xylar already mentioned here. But I can take a look at your Docker image/Dockerfile if you have it around.
Also, I'd try this first. |
@lwasser, I'm trying to do a local On the command line, I get trouble if I don't have |
Okay, I did a local install:
And I get the same as you:
I'll look into it and see what I can figure out. Thanks for bringing this to our attention! |
I can install |
I guess some old unpinned package is in there :-( |
I can reproduce the problem with just:
So presumably an incompatibility there? |
Awesome! Thanks @xylar!! I'll check the packages in that installation and see what's wrong with pins. |
I messed it up somehow in #88 |
Thank you both so much. @xylar and @ocefpaf just a note - when i tried to run
if i can be helpful here in any way please let me know but again thank you both!! |
Marking them as broken is easier for now and can be reversed once we to a repodata patch. |
@lwasser, do you maybe not have |
Somewhat in my defense, Upstream doesn't list I was following their lead. |
hi @xylar my apologies. i fixed it and now can see the issue - cartopy doesn't install correctly. |
@lwasser, once we fix this, you are likely to have other conflicts in your packages. Something was causing the package solver to try to install an old version of |
@lwasser, so I think a part of the problem is likely to be that conda-forge is not building packages with I suspect you would have considerably better luck with your docker build if you are able to update to 3.6. Would that work for you? |
The following worked for me:
Whereas I wasn't able to install |
@xylar i can absolutely update r. can you tell me |
i am fine with moving to r version 4.x too... but trying 3.6 now locally |
The quotes are necessary when I'm running on the Linux command line because otherwise the stuff gets redirected to a file called
Oh, great! That'll help with these conflicts considerably.
I'm not a Fingers crossed. |
ok!! thank you @xylar i'm working on these updates now. Bumping to r 3.6 fixed a lot! i'm going to add proj as you mention too now but it all works locally now. i'll work on bumping to r version 4.x as well! we have some older lessons that i suspect may fail but at some point we will need to update those anyway! thank you again! |
I believe the issue of cartopy installing incorrectly with an older version of |
The cartopy package that worked with proj 7.0.0 was marked as broken because proj wasn't being explicitly pinned to a compatible version (conda-forge/cartopy-feedstock#93). As a result, there is no build of cartopy 0.18.0 that works with proj 7.0.0.
hi again @xylar and @ocefpaf i'm running into another environment issue - it is not specific to cartopy - but it is in my same docker image. i've actually removed all of the r installs locally to simplify and still get a really significant amount of dep conflicts. the only change that i made to the environment was to add rioxarray. I see that you may be working on something today xylar given that reference above. suggestions as to how i can pin down where the conflicts are starting? this is my failed build - earthlab/r-python-eds-lessons-env#39 here is just the beginning of the erros when building the entire image with r and python
note branca is pinned because of a map rendering issue - that didn't seem to cause the issue Has anything changed that may impact this container build in the past few days? things were building well last week! thank you for any suggestions! |
here is the (very beginning of) the output for when i build locally without any r stuff
|
@lwasser, I think the problem is that your miniconda environment is now python 3.9, rather than python 3.9. You specify python=3.8 but python is already installed in your miniconda environment and I don't believe it is getting downgraded to python 3.8 as you are requesting, or at least the package solver is looking for python 3.9 packages. I would suggest one of a two approaches:
|
thank you xylar... ok so here is what i've tried so far Just run with python 3.9 doesn't work - lots of conflicts.
i also tried
and it didn't like that syntax. i'm happy to share more code / docker file examples with you but i don't want to consume your time. i just keep getting conflicts or errors. |
@lwasser, could we move this discussion to an issue under your project, since it no longer relates to cartopy? I'd be happy to discuss more with you under https://github.com/earthlab/r-python-eds-lessons-env/issues |
@xylar of course... i'll move more specifics there and will ping you! thank you for your time. |
Issue:
hi there @ocefpaf et al... i'm running into some issues with installing cartopy in a linux envt and am not sure whether to post here or on the cartopy GH repo? Essentially when i installed it i get this issue:
i've tried
apt-get install libgeos++-dev
(Unable to install cartopy with pip3 SciTools/cartopy#1239 (comment))apt-get install libproj-dev
Unable to install cartopy with pip3 SciTools/cartopy#1239 (comment)and still i'm getting this cannot open shared object file issue. am i missing an important step? i tried to ensure all of the cartopy dependencies were installed but maybe they aren't. if i should post somewhere else please say the word.
conda install -c conda-forge proj4
based on a few other threads i read but it seems to be having a hard time installing that / resolving the correct envt versions and has been spinning now for about 10 minutes.ANy suggestions on things i could try to get things to resolve correctly would be much appreciated!
Environment (
conda list
): https://github.com/earthlab/r-python-eds-lessons-env/blob/master/DockerfileDetails about
conda
and system (conda info
):The text was updated successfully, but these errors were encountered: