Difference between revisions of "Python"

From Wasya Wiki
Jump to: navigation, search
(Created page with " python3 -m pip install --user --upgrade pip python3 -m pip --version Afterwards, you should have the latest version of pip installed in your user site: pip 21.1.3 from $...")
 
 
(13 intermediate revisions by the same user not shown)
Line 1: Line 1:
python3 -m pip install --user --upgrade pip
 
  
 +
  pip3 install --upgrade pip --user ## From: https://askubuntu.com/questions/905196/pip-fails-with-readtimeouterror
 +
  ## sudo pip --default-timeout=1000 install jupyter
 +
  pip install -U --timeout 10000 torch ## timeout in seconds ## 2.2.2, but 2.6.0 ?
 +
 +
python3 -m pip install --user --upgrade pip
 
  python3 -m pip --version
 
  python3 -m pip --version
 +
python3 -m venv zenv
 +
. zenv/bin/activate
 +
 +
 +
You can run:
 +
 +
pip freeze > requirements.txt
 +
pip install -r requirements.txt
 +
 +
To exit:
 +
 +
deactivate
  
Afterwards, you should have the latest version of pip installed in your user site:
+
== python 2.7 ==
  
  pip 21.1.3 from $HOME/.local/lib/python3.9/site-packages (python 3.9)
+
  sudo apt-get install python2.7-dev
 +
  sudo apt install python-pip
 +
  pip2 install virtualenv  
 +
  python2.7 -m virtualenv zenv
 +
  . zenv/bin/activate

Latest revision as of 17:15, 27 March 2026

 pip3 install --upgrade pip --user ## From: https://askubuntu.com/questions/905196/pip-fails-with-readtimeouterror
 ## sudo pip --default-timeout=1000 install jupyter
 pip install -U --timeout 10000 torch ## timeout in seconds ## 2.2.2, but 2.6.0 ?
python3 -m pip install --user --upgrade pip
python3 -m pip --version
python3 -m venv zenv
. zenv/bin/activate


You can run:

pip freeze > requirements.txt
pip install -r requirements.txt

To exit:

deactivate

python 2.7

 sudo apt-get install python2.7-dev
 sudo apt install python-pip
 pip2 install virtualenv  
 python2.7 -m virtualenv zenv
 . zenv/bin/activate