Environment

From UFAL AIC
Revision as of 14:14, 9 May 2022 by Vodrazka (talk | contribs) (Virtual environment)

Python

If you need to use a different version of python than the default one installed with node OS you can use pre-installed versions found at:

/opt/python

If you need some specific version not found in this directory please contact the AIC administrators.


Virtual environment

The recommended way is to use python through a virtual environment. You need to decide which PYTHON_VERSION you want to use and where do you want to store your virtual environment (VENV_PATH). Then you can create it:

/opt/python/<PYTHON_VERSION>/bin/python3 -m venv <VENV_PATH>

You need to activate the environment before you actually use it:

source <VENV_PATH>/bin/activate

Then you should be able to use the python version of your choice. More about virtual environments can be found here