Learning_how_to_model
Learning_how_to_model

Reputation: 51

'[Errno 2] No such file or directory' error when installing Basemap

I am using Spyder as part of Anaconda. When trying to install the package 'Basemap', the following error is returned:

[Errno 2] No such file or directory: 'C:\BASINS42\bin\PROJ_NAD\epsg'

For context, BASINS is a GIS-based environmental modelling software which I recently deleted. Not sure why Python thinks it's relevant.

I would like to successfully install the python Basemap package.

In the Anaconda Prompt, I have typed 'conda install basemap', and the prompt replies: 'All requested packages already installed'

from mpl_toolkits.basemap import Basemap

Upvotes: 0

Views: 2538

Answers (1)

mlcr
mlcr

Reputation: 335

I don't exactly understand the question but I assume you need hi-resolution basemap data. This is not contained in Basemap by default. You need to install mpl_toolkits separately in your conda environment with:

conda install -c conda-forge basemap-data-hires 

See also here.

After doing this, executing

from mpl_toolkits.basemap import Basemap

from python console should work normally.

Upvotes: 2

Related Questions