matplotlib / basemap

Plot on map projections (with coastlines and political boundaries) using matplotlib
MIT License
779 stars 392 forks source link

using basemap on azure notebooks #422

Closed leomiquelutti closed 2 years ago

leomiquelutti commented 6 years ago

Dear,

I am trying to execute some codes on the (also) free cloud service provider Microsoft Azure Notebooks for jupyter notebooks that depend on Basemap but have not been able to.

A way to fetch codes on Azure Notebooks is through !pip install package, but I didn't succeed with Basemap. Is there a way to run Basemap there?

WeatherGod commented 6 years ago

The recommended way to install basemap, is through conda-forge, so run !conda install -c conda-forge basemap (assuming that conda is already installed).

On Sat, Sep 15, 2018 at 8:25 AM Leonardo Miquelutti < notifications@github.com> wrote:

Dear,

I am trying to execute some codes on the (also) free cloud service provider Microsoft Azure Notebooks https://notebooks.azure.com for jupyter notebooks that depend on Basemap but have not been able to.

A way to fetch codes on Azure Notebooks is through !pip install package, but I didn't succeed with Basemap. Is there a way to run Basemap there?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/matplotlib/basemap/issues/422, or mute the thread https://github.com/notifications/unsubscribe-auth/AARy-JCZRG2Ec9AUMrBT8dOY_usqIqmCks5ubPGngaJpZM4WqVhk .

phobson commented 6 years ago

Just a quick note, if you're trying to install from the notebook itself, you'll need to change the command from @WeatherGod to:

!conda install -c conda-forge basemap --yes

Since you won't be able to answer the Yes/No prompt interactively

leomiquelutti commented 6 years ago

Sorry for the late reply. Thank you guys for the comments.

The !conda install -c conda-forge basemap totally crashed my Azure Notebook environment.

I can't even say that the !conda install -c conda-forge basemap --yes will work because I still couldn't fix the environment to try it. Once I fix it, I'll get back here to give you feedback.

rezapci commented 5 years ago

Did you fix it ?

rezapci commented 5 years ago

this is the fix for notebook.azure !pip install https://github.com/matplotlib/basemap/archive/master.zip

leomiquelutti commented 5 years ago

Nope! My azure notebook environment is still crashed - take a look at this issue. I didn't have the patience to start everything over.

I overcame the problem using mybinder

molinav commented 2 years ago

We now have precompiled binary wheels for Windows, so it should be possible to install basemap with pip as you would do with any other package (for Windows x86 and x64, Python 2.7 and 3.5-3.9):

!pip install basemap

In case you need the high-resolution datasets, you need to install them manually:

!pip install basemap-data-hires

The solution by @rezapci will not work at the moment, because the refactoring of basemap into three separate packages (basemap, basemap-data and basemap-data-hires) implied the movement of the setup.py file to another place different from the project top-level folder, so pip will not know what to do with the repository zip.

If this solution still does not solve your problem, feel free to reopen this issue or create a new one.