Installation Error: installing basemap on windows
Asked Answered
S

1

8

I'm trying to install basemap, and it seems worked fine using,

conda install -c conda-forge basemap

in anaconda prompt. However when I entered this code on my jupyternotebook,

import matplotlib.pyplot as plt
from mpl_toolkits.basemap import Basemap

it showed an error:

FileNotFoundError                         Traceback (most recent call last)
<ipython-input-2-4fc84cbcc854> in <module>()
  1 import matplotlib.pyplot as plt
----> 2 from mpl_toolkits.basemap import Basemap

~\Documents\DataScience\data\lib\site- 
packages\mpl_toolkits\basemap\__init__.py in <module>()
144 
145 # create dictionary that maps epsg codes to Basemap kwargs.
--> 146 epsgf = open(os.path.join(pyproj.pyproj_datadir,'epsg'))
147 epsg_dict={}
148 for line in epsgf:

FileNotFoundError: [Errno 2] No such file or directory: 'epsg'
Sextant answered 20/9, 2018 at 23:44 Comment(0)
I
0

Looks like matplotlib tries to access some information that isn't in the same conda package.

According to this comment on an issue, epsg data is in a package proj4, and you have to set environment variable PROJ_LIB so that matplotlib finds it.

Iridescent answered 2/6, 2019 at 16:19 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.