0

I installed spyder onto my computer a few months ago and it has worked fine until I needed to produce a map with station plots and topography. I simply tried to import matplotlib-basemap and get the following error:

File "<ipython-input-12-6634632f8d36>", line 1, in runfile('C:/Users/Isa/Documents/Freedman/2018/ENVIROCOMP/Stationplots.py', wdir='C:/Users/Isa/Documents/Freedman/2018/ENVIROCOMP')

File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 710, in runfile execfile(filename, namespace)

File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 101, in execfile exec(compile(f.read(), filename, 'exec'), namespace)

File "C:/Users/Isa/Documents/Freedman/2018/ENVIROCOMP/Stationplots.py", line 15, in from mpl_toolkits.basemap import Basemap, shiftgrid, cm

File "<frozen importlib._bootstrap>", line 971, in _find_and_load

File "<frozen importlib._bootstrap>", line 951, in _find_and_load_unlocked

File "<frozen importlib._bootstrap>", line 890, in _find_spec

File "<frozen importlib._bootstrap>", line 864, in _find_spec_legacy

File "C:\ProgramData\Anaconda3\lib\site-packages\pyximport\pyximport.py", line 253, in find_module fp, pathname, (ext,mode,ty) = imp.find_module(fullname,package_path)

File "C:\ProgramData\Anaconda3\lib\imp.py", line 271, in find_module "not {}".format(type(path)))

RuntimeError: 'path' must be None or a list, not <class '_frozen_importlib_external._NamespacePath'>

If anyone has gone through this or understands this type of error suggest a way to make basemap work on spyder?

1 Answer 1

0

(Spyder maintainer here) This error was fixed in our 3.2.8 version, released in March/2018.

Since you're using Anaconda, please open the Anaconda prompt and run there

conda update spyder

to get the fix.

Sign up to request clarification or add additional context in comments.

2 Comments

A simple fix! Thank you!
Could you mark my answer as correct, by selecting the green check mark next to it? Thanks!

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.