Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FileNotFound when importing basemap #430

Closed
statiksof opened this issue Oct 16, 2018 · 2 comments
Closed

FileNotFound when importing basemap #430

statiksof opened this issue Oct 16, 2018 · 2 comments

Comments

@statiksof
Copy link

When I do:

from mpl_toolkits.basemap import Basemap

I get:

---------------------------------------------------------------------------
FileNotFoundError                         Traceback (most recent call last)
<ipython-input-2-b18c5f1c9a35> in <module>()
----> 1 from mpl_toolkits.basemap import Basemap, cm

/opt/conda/lib/python3.6/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'
@gaswani
Copy link

gaswani commented Oct 17, 2018

I managed to find a solution to this error. I found the solution at https://conda-forge.org/

In the bash terminal I first typed :

$ conda config --add channels conda-forge

Followed by:

$ conda install basemap

I thereafter ran my script in Juptyer notebook and the error was gone. I was able to plot the Chloropeth map of the world.

@statiksof
Copy link
Author

This was fixed for my case by installing the new basemap (instead of the old build) and then setting up the PROJ_LIB in Dockerfile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants