-
Notifications
You must be signed in to change notification settings - Fork 7
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
KeyError 'PROJ_LIB' #2
Comments
I am having the same issue: ~/anaconda3/lib/python3.6/site-packages/mpl_toolkits/basemap/init.py in () ~/anaconda3/lib/python3.6/os.py in getitem(self, key) KeyError: 'PROJ_LIB' Anyone out there with an idea of how to resolve this problem? |
This is a bug that happens with BaseMap (see [https://github.com/matplotlib/basemap/issues/419]) I fixed it on my Linux machine by installing: conda install -c conda-forge basemap-data-hires In future I'm not using BaseMap anymore, there are just too many problems. I switched to cartopy ( https://scitools.org.uk/cartopy/docs/v0.16/ ). Next week I will have a talk at pycon.de and I will provide an updated notebook using cartopy (in a new repository called PyConDE2018). And at some point, I'll upgrade this notebook too. |
@martinchristen interesting, I tried that on my Linux machine with no luck. Maybe this is another version-sensitive issue? |
@joefutrelle I opened this issue (conda-forge/basemap-feedstock#30) a month a ago. Maybe you find something interesting for your case. |
@joefutrelle I checked the history on my Linux machine and I actually did the following: conda remove basemap But as I mentioned, I moved away from basemap and I'm using cartopy now which is available using conda install cartopy |
I managed to find a solution to this error. I found the solution at https://conda-forge.org/ In the bash terminal I first typed : $ conda config --add channels conda-forge Followed by: $ conda install basemap I thereafter ran my script in Juptyer notebook and the error was gone. I was able to plot the Chloropeth map of the world. |
this was the only way i had to resolve the KeyError 'PROJ_LIB', using this : https://gist.github.com/junzis/36fee36acd7cadfdf1c01c06d97f4947 |
Please use a conda environment. The PROJ_LIB is set if you are not do everything in the base environment. The base environment is to host the packages for creating and managing envs. if you don't use a conda environment you have to set the env var and path yourself. Just search on the discussion about this conda install -c conda-forge proj4 |
This gonna work for sure, but just check where is your Anaconda Path up to share folder(WINDOWS)
|
In the notebook
BinderNotebook
Executingreturns:
The text was updated successfully, but these errors were encountered: