User Tools

Site Tools


set_up_your_own_python_environment

This is an old revision of the document!


Set Up Your Local Python Environment

Use the below to install python libraries that “normally” would be installed in a system directory such as /usr/local/lib/pythonX.Y. Use the –user flag to install to a directory you have control over as a user. Here are more details:

  • –user installs in the directory specified in site.USER_SITE
    • example: ~/.local/lib/pythonX.Y/site-packages
  • add this folder to your PATH (in ~/.bash_profile file):
    • export PATH=$PATH:~/.local/lib/pythonX.Y/site-packages

An alternative to this is to use python virtual environments

Sources:

set_up_your_own_python_environment.1604380771.txt.gz · Last modified: 2020/11/03 05:19 by peteyboy