This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Last revisionBoth sides next revision | ||
working_with_python [2020/12/03 15:24] – [Jupyter Notebooks] deul | working_with_python [2020/12/22 14:06] – jansen | ||
---|---|---|---|
Line 138: | Line 138: | ||
virtualenv --help | virtualenv --help | ||
</ | </ | ||
+ | |||
==== METHOD 3: easy_install with the `--user' | ==== METHOD 3: easy_install with the `--user' | ||
Easy Install is a python module (easy_install) that lets you automatically download, build, install, and manage Python packages. | Easy Install is a python module (easy_install) that lets you automatically download, build, install, and manage Python packages. | ||
Line 155: | Line 156: | ||
python -m easy_install --help | python -m easy_install --help | ||
</ | </ | ||
+ | |||
+ | ==== Migrating packages between python versions ==== | ||
+ | Another issue when using personal installs may arrise on operating system upgrades, when a newer version of python is made the default (eg, moving from python 3.7 to python 3.9). | ||
+ | Notes copied from the [[https:// | ||
+ | - Make a list of installed packages in the old python version: | ||
+ | <code bash> | ||
+ | python3.7 -m pip freeze > installed.txt | ||
+ | </ | ||
+ | - Reinstall for the current python version: | ||
+ | <code bash> | ||
+ | python3.9 -m pip install --user -r installed.txt | ||
+ | </ | ||
+ | - Optionally, uninstall the packages from the old python version and/or remove the obsolete directory under $HOME/ | ||
===== Example: how to let python search arbitrary library paths ===== | ===== Example: how to let python search arbitrary library paths ===== | ||
For instance for python v2.7 installations, | For instance for python v2.7 installations, |