While we have installed a small number of highly-used packages to each version of Python, we encourage users to maintain their own Python packages. This ensures that the user has no discontinuity in their workflow waiting for packages to be installed and that packages work with the user's chosen, loaded Python version module. Python packages are built specifically to a version of Python and may not work properly if a different version of Python is loaded. For example, there is still a great disparity between Python 2 and Python 3. O2's "module" feature allows users to quickly and easily switch between Python versions.
Useful commands:
Command | Meaning | ||
---|---|---|---|
| shows the versions of Python installed on O2 (requires | ||
| loads an individual module (substitute version for an actual version) | ||
| unloads an individual module | ||
| shows the current version of Python loaded | ||
| shows what packages are installed for currently loaded Python module |
Note that in order for module avail python
to give any output, you must have gcc/6.2.0
loaded into your environment. Alternately, you can use module spider python
to circumvent this, but you will still need gcc/6.2.0
loaded in order to load any python modules that are installed.
...
Code Block |
---|
(venv)mfk8@login01:~$ deactivate mfk8@login01:~$ |
NOTE:
The executable for Python 3.x is python3 and not python, the choice was made by the Developers to mark a clear difference between version 2.x and 3.x, as as old python 2.x scripts might not be fully compatible across the version jump.
A symbolic link python → python3 is created within each python 3.x virtual environment, this link allows to execute python3 scripts using python instead of python3 when the virtual environment is active, however the link does not exist outside of the python virtual environment.
...