Install Package in Python - Query


#1

I’m having a hard time installing the python libraries regionmask, cartopy and pysheds.

I installed them four times already, but they do not remain, for some reason they are deleted.

I want to know why this happens.


#2

Hello nogales02,

we are sorry for the trouble! We are working on a solution for keeping libraries which are installed by the users. We will write a post, as soon as the libraries will be persistent.

Best regards,
Alicja


#3

As an interim solution you could use pip instead. You might have to watch your versions and dependencies, though but I could get it running. Installing into your workspace will make the installation persistent.

mkdir $HOME/work/workspace/.local
pip install --install-option="--prefix=$HOME/work/workspace/.local" cartopy

You will need to add the installation prefix to your paths in python:

import sys
sys.append('$HOME/work/workspace/.local/lib/python3.6/site-packages')

and then as usual:

import cartopy

#4

Hi DZelge

Thank you very much for your answer