Importing Basemap gives KeyError 'PROJ_LIB'

Hi,

for some reason, Basemap module cannot be imported anymore in the ESDL hub.

I quickly looked for solutions, and found these:

  1. https://github.com/matplotlib/basemap/issues/419
  2. https://github.com/conda-forge/basemap-feedstock/issues/30.

The problem might be that some dependencies that Basemap rely on have changed.

Matias

Hi Matias,
did you manage to solve the problem with these solutions and if so, how exactly?
Kind regards,
Joscha

Hi Joscha,

Thanks for your message. Unfortunately, I didn’t find any solutions for this. The links were just for reference, that the problem might be related to package dependencies, and not due to errors in the ESDL system or the Basemap package.

Best,
Matias

Ps. I also tried to answer your e-mail some time ago, but maybe the message didn’t go trough…

Hi,

I think the issue can be solved by setting

os.environ[‘PROJ_LIB’] = ‘/opt/conda/pkgs/proj4-5.2.0-he1b5a44_1003/share/proj’

before importing Basemap. Does it work for you also, Joscha?

Matias