Importing Basemap -syntax error

Hi @abymir5710000, are you running this on your local machine, I cannot figure out where the screenshot is from (dataquest env or local machine). Thanks.

1 Like

i’m using local machine!

Hey @abymir5710000

I don’t see any issue in your code but i am unsure that basemap is already installed in your system?

Try checking Basemap is already installed in your local machine or not by passing the below commands

conda create -n basemap python=3
conda activate basemap
conda install basemap

If not , try to install and activate then run the code . I think it should work then.

Alternatively you can also check here on the same

Let me know your status.

Best
K!

1 Like

This is the new error

Hi @abymir5710000,

Module for plotting data on maps with matplotlib.

This is supposed to be a docstring (comment) as you can see here. So either this is a bug in the basemap version you are using or you may have accidentally edited this file to remove the triple quote (""") above this comment.

In any case, it can be fixed by changing the basemap version. Can you please try installing version 1.2.1?

conda install -c conda-forge basemap=1.2.1

Best,
Sahil

2 Likes