7

Have had a nightmare downloading basemap, have had so many errors and fixing them, but yet another shows up. I now keep getting the following error:

Using spyder I write:

from mpl_toolkits.basemap import Basemap

And it outputs:

 File "/anaconda3/lib/python3.7/site-packages/mpl_toolkits/basemap/__init__.py", 
line 152, in <module>
    epsgf = open(os.path.join(pyproj.pyproj_datadir,'epsg'))

AttributeError: module 'pyproj' has no attribute 'pyproj_datadir'

I tried:

pip install pyproj==1.9.6

but within a large amount of text a line in red says:

Failed building wheel for pyproj
James Lloyd
  • 319
  • 3
  • 14

1 Answers1

3

i was working through the same nightmare of installing basemap in Windows and for this error your fix with

pip install pyproj==1.9.6

worked for me, but I had to close Spyder (or Jupyter or any IDE). Having it open gave a Permission Error during the pip install. I got this from this post: Python - PIP install trouble shooting - PermissionError: [WinError 5] Access is denied

Joris
  • 1,158
  • 1
  • 16
  • 25