Python installation#
Python specific ENV4101 environment#
We recommend to create a specific environment with the required python modules and then to activate it. By default, the virtualenv creates a subdirectory in the current directory with all the required modules.
Then create the env4101 environment:
cd $HOME
virtualenv env4101
Activate the env4101 environment:
source $HOME/env4101/bin/activate
Install the required modules:
pip3 install scikit-learn
pip3 install numpy
pip3 install pandas
pip3 install -v yoctopuce==1.10.50357
pip3 install statistics
pip3 install matplotlib
pip3 install tqdm
pip3 install pymdptoolbox
pip3 install jupyterlab
pip3 install notebook
pip3 install scipy
pip3 install ipywidgets
Alternative for pip installation:
python3 -m pip install MODULE-NAME
During the labs, perform the different tasks with the env4101 environment activated.
At the end, you can simply close the terminal or deactivate the current environment:
deactivate
To check which python environment is activated, you can use one of the following commands:
echo $VIRTUAL_ENV
or
python -c "import sys; print(sys.prefix)"
If you want to run some labs on your own machine, you first have to install python and pip.#
Already done in the TSP labs room
sudo apt install python3
sudo apt install python3-pip