Commit b6788c59 authored by Michael Krause's avatar Michael Krause 🎉
Browse files

python: structure and wording

parent 5749f3e0
Pipeline #6727 passed with stages
in 35 seconds
......@@ -144,20 +144,6 @@ For convenience reasons we also installed a module called `virtualenvwrapper`_,
(project) $ deactivate
$
Note how :file:`virtualenv` is also managing your shell prompt, so you always
know which Python environment you are currently running. All your virtual
environments created this way reside in your home directory under
:file:`~/.virtualenvs/`. In theory you could just run the virtual python
interpreter that is installed in :file:`~/.virtualenvs/<env_name>/bin/python`
directly. It is much more convenient to use the wrapper functions though.
.. important::
To use the virtualenvwrapper convenience functions (workon etc) in a torque
job file you need to add one of the following lines to your job definitions:
:file:`source /etc/bash_completion` **or** :file:`module load virtualenvwrapper`
**Upgrade a virtual environment**
If you intend to upgrade the python version in a virtualenv from 3.X to 3.Y you
......@@ -184,9 +170,23 @@ R major version upgrades. The process looks something like this:
# 8. reinstall all packages from the freeze file
pip install -r env.txt
# 9. inspect version incompatibilities, some old packages might not work/build with your new python
diff env.txt <(pip freeze)
diff env.txt <(pip freeze) # should output nothing or the difference of the old and new env
Note how :file:`virtualenv` is also managing your shell prompt, so you always
know which Python environment you are currently running. All your virtual
environments created this way reside in your home directory under
:file:`~/.virtualenvs/`. In theory you could just run the virtual python
interpreter that is installed in :file:`~/.virtualenvs/<env_name>/bin/python`
directly. It is much more convenient to use the wrapper functions though.
.. important::
To use the virtualenvwrapper convenience functions (workon etc) in a torque/SLURM
job file you need to add one of the following lines to your job definitions:
:file:`source /etc/bash_completion` **or** :file:`module load virtualenvwrapper`
Conda
-----
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment