0

I think this is a basemap problem , but I really don't know how to fix it.

I tried do update Anaconda , reinstall basemap from there (root , miniconda and reticulate , from pip ...)

The error code is KeyError: 'PROJ_LIB'

Detailed traceback: 
  File "<string>", line 1, in <module>
  File "/Library/Frameworks/R.framework/Versions/4.0/Resources/library/reticulate/python/rpytools/loader.py", line 24, in _import_hook
    level=level
  File "/Users/someone/Library/r-miniconda/envs/r-reticulate/lib/python3.6/site-packages/mpl_toolkits/basemap/__init__.py", line 152, in <module>
    pyproj_datadir = os.environ['PROJ_LIB']
  File "/Users/someone/Library/r-miniconda/envs/r-reticulate/lib/python3.6/os.py", line 669, in __getitem__
    raise KeyError(key) from None

I tried do update Anaconda , reinstall basemap from there (root , miniconda and reticulate , from pip ...)

I'm on MacOS Big Sur 11.1.

  • Welcome to Stackoverflow! It is better to think of this community like you do for Wikipedia. Users come here with a specific question in mind, looking for a specific answer. It is best practice to provide a minimal amount of code. As far as I can see, a lot of your code doesn't have to do with the error. For readability, I strongly suggest you revise the post. Thank you! – Aman Dec 29 '20 at 05:42
  • 1
    In fact I don't think the problem has to do with the code , rather with a package error (basemap) but I added it for completeness. Thank you for your suggestion tho, I will delete all this code so if anyone wants to help will have a more readable version of the question! – Antonio Taur Dec 29 '20 at 16:09
  • Does this answer your question? [Basemap import error in PyCharm — KeyError: 'PROJ\_LIB'](https://stackoverflow.com/questions/52295117/basemap-import-error-in-pycharm-keyerror-proj-lib) – ewokx Dec 30 '20 at 00:31

0 Answers0