AttributeError: module 'pyproj' has no attribute 'pyproj_datadir'
Asked Answered
L

1

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
Lorinalorinda answered 19/4, 2019 at 23:40 Comment(2)
Possible duplicate of Python basemap in google colaboratoryOfficialism
This didn't work, I've edited my post as aboveLorinalorinda
W
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

Windsail answered 25/4, 2019 at 13:9 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.