ADDING LIBRAIRIES (PYTHON)

There’s a setup configuration of the Datalab that makes all the libraries be persistent. They never go away even if your Datalab is deleted. You could always come back and retrieve them as if you never left.

Python

The only thing you have to do when installing a package is:

pip3 install <package> --user
  • Exemple :

Here is the list of packages which are installed within the persistent configuration

cookbook14 1

If you want to install psycopg2 and psycopg2-binary for postgres use and make them permanent

pip3 install psycopg2 psycopg2-binary --user

With the result :

cookbook14 2

Rstudio

There are two ways to install packages in rstudio environment.

The UI form

cookbook14 3

Resulting in (while installing httr) :

cookbook14 4

The console

> install.packages("cli", lib="~/R")

With the result :

cookbook14 5