Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Michael Krause
tardis-doc
Commits
b6788c59
Commit
b6788c59
authored
Aug 11, 2020
by
Michael Krause
🎉
Browse files
python: structure and wording
parent
5749f3e0
Pipeline
#6727
passed with stages
in 35 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
software/python.rst
View file @
b6788c59
...
@@ -144,20 +144,6 @@ For convenience reasons we also installed a module called `virtualenvwrapper`_,
...
@@ -144,20 +144,6 @@ For convenience reasons we also installed a module called `virtualenvwrapper`_,
(project) $ deactivate
(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**
**Upgrade a virtual environment**
If you intend to upgrade the python version in a virtualenv from 3.X to 3.Y you
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:
...
@@ -184,9 +170,23 @@ R major version upgrades. The process looks something like this:
# 8. reinstall all packages from the freeze file
# 8. reinstall all packages from the freeze file
pip install -r env.txt
pip install -r env.txt
# 9. inspect version incompatibilities, some old packages might not work/build with your new python
# 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
Conda
-----
-----
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment