Introduction to scientific computing with Python


Windows and macOS

Install Anaconda for Windows or macOS.


You can either install Anacoda for Linux or (favorite option) install python3 with its package manager pip:

sudo apt-get install python3 python3-pip spyder3 ipython3

Before installing a package, make sure that you have the latest version of pip:

sudo pip3 install --upgrade pip

Then, install the required packages manually:

sudo pip3 install jupyterlab numpy scipy matplotlib pillow scikit-learn seaborn pandas statsmodels cvxopt ipympl tensorflow

To launch JupyterLab, write in a shell:



If you have trouble installing a package, you can use Ubuntu/Debian package manager:

sudo apt-get install python3-[package_name]

If you have trouble performing linear regression with StatsModels, update the package patsy:

sudo pip3 install --upgrade patsy

If the trouble concerns a “distutils installed project”, you can use a downgraded version of pip:

sudo pip3 install --upgrade --force-reinstall pip==9.0.3
sudo pip3 install [package_name] --disable-pip-version-check
sudo pip3 install --upgrade pip

If you have a trouble with interactive plots in JupyterLab (in particular with ipympl), try:

sudo pip3 install --upgrade jupyterlab ipympl
# Install nodejs with those two lines or have a look at
wget -qO- | sudo -E bash -
sudo apt install -y nodejs
sudo jupyter labextension install @jupyter-widgets/jupyterlab-manager
sudo jupyter labextension install jupyter-matplotlib