+ 2

HOW to install Basemap ??

from mpl_toolkits.basemap import Basemap This is the command I used to install it? Then it showed me the module found error Then i used "pip instal mpl_toolkits" sommand to install it. After that it got installed successfully but when I tried "from mpl_toolkits.basemap import Basemap" again it showed me the modulefound error again? This is my code from mpl_toolkits.basemap import Basemap import matplotlib.pyplot as plt def mapTut(): m = Basemap(projection='mill',llcrnrlat=20,urcrnrlat=50,\ llcrnrlon=-130,urcrnrlon=-60,resolution='c') m.drawcoastlines() m.drawcountries() m.drawstates() m.fillcontinents(color='#04BAE3',lake_color='#FFFFFF') m.drawmapboundary(fill_color='#FFFFFF') # Houston, Texas lat,lon = 29.7630556,-95.3630556 x,y = m(lon,lat) m.plot(x,y, 'ro') lon, lat = -104.237, 40.125 # Location of Boulder xpt,ypt = m(lon,lat) m.plot(xpt,ypt, 'go') plt.title("Geo Plotting") plt.show() mapTut() What should i do?

31st Mar 2021, 4:48 AM
K.S.S. Karunarathne
K.S.S. Karunarathne - avatar
5 Respuestas
+ 1
CoolDie This isn't working
31st Mar 2021, 9:35 AM
K.S.S. Karunarathne
K.S.S. Karunarathne - avatar
+ 1
Then what should I do?
31st Mar 2021, 11:41 AM
K.S.S. Karunarathne
K.S.S. Karunarathne - avatar
0
Open a terminal and type "pip install basemap" or in an interpretator: >>> import pip >>> pip.main(["install", "basemap", "--user"])
31st Mar 2021, 5:31 AM
Operand
Operand - avatar
0
Such a library does not exist .-.
31st Mar 2021, 5:34 AM
Operand
Operand - avatar
31st Mar 2021, 9:55 AM
Operand
Operand - avatar