Installation - virtualenv
If the program need to use Python libraries that are not available on the system, then the user have to install them by her/himself using the virtual environment. This can be done by following the instructions below.
- Start the interactive session.
- Load the Python interpreter from the list of available modules.
- Create the virtual environment (Python 3.x):
python3.6 -m venv my_env_name(wheremy_env_nameis the name of the new folder where the virtual environment will be created. - Activate the environment:
source. /my_env_name/bin/activate. - Update the tool:
pip install --upgrade pip - Install the necessary libraries, for example
pip install numpy - The virtual environment is ready. After completing the work, just type the
deactivatecommand. When you come back to work with Python again, remember to activate the enviroment again (point 3) - only then will the locally installed libraries be available.