Difference between revisions of "ML computers python"

From Interaction Station Wiki
Jump to navigation Jump to search
(Created page with "== Installing pip and pip3 == sudo apt-get install python-pip python3-pip --yes sudo python3 -m pip install pip --upgrade --force-reinstall sudo python -m pip install pip -...")
 
Line 13: Line 13:
 
*When using pip or pip3, python packages get installed here:
 
*When using pip or pip3, python packages get installed here:
 
  /usr/local/lib
 
  /usr/local/lib
   
+
 
 
*site-packages directories can be listed with:
 
*site-packages directories can be listed with:
 
  python -m site --user-site
 
  python -m site --user-site

Revision as of 22:24, 27 November 2019

Installing pip and pip3

sudo apt-get install python-pip python3-pip --yes
sudo python3 -m pip install pip --upgrade --force-reinstall
sudo python -m pip install pip --upgrade --force-reinstall 
alias python='export PYTHONPATH=${PYTHONPATH2};python'
alias python3='export PYTHONPATH=${PYTHONPATH3};python3'

Helpful info

  • When using pip or pip3, python packages get installed here:
/usr/local/lib
  • site-packages directories can be listed with:
python -m site --user-site
  • Everything that you install with pip3 is in:
/home/interactionstation/.local/lib/python3.7/site-packages
  • With the parameter --target you can specify where it needs to be installed:
sudo pip3 install --upgrade tensorflow==1.3.0 -- target="/home/interactionstation/.local/lib/python3.7/site-packages"