tags: pip upgrade pip batch upgrade
Premise: python, pip installed
If pip is slow, you need to modify the pip source:
Method under Linux:
vi ~/.pip/pip.conf
Paste on Alibaba source:
[global]
trusted-host = mirrors.aliyun.com
index-url = https://mirrors.aliyun.com/pypi/simple
Just execute the following code.
import os
r = os.popen('pip list --outdate')
# r = os.popen('pip list ')
r = r.read().splitlines()
if len(r)>2:
for l in r[2:]:
outdated_pkg = l.split(' ',1)[0]
print(outdated_pkg)
tmp = os.popen('pip install --upgrade '+outdated_pkg)
for nr in tmp.read().splitlines():
print(nr)
print('done')
The current built-in commands of pip do not support upgrading all installed Python modules. List the currently installed packages: List upgradeable packages: Upgrade a package: Upgrade all upgradeable...
At this time, we need to go to the directory where the file is located, and then enter python update.py on the command line. At this time, we will start to automatically upgrade all packages as shown ...
Upgrade all packages: Three steps: After this step is completed, you will get a txt, terminal inputrequirements.txtOpen this txt, which is: alabaster==0.7.11 anaconda-client==1.7.2 anaconda-navigator=...
Create a new python directory path in environment variables python -m pip install --upgrade pip upgrade pip, pip install opencv-python install opencv package pip install moviepy installs moviepy packa...
In the windows file manager, enter%APPDATA%,Enter Then it will locate a new directory, create a pip folder in this directory, and then create a pip.ini file in the pip folder Finally, enter the conten...
pip [1] Use pip to set the current Python environmentPackage name and version information of all installed packages, The output is redirected to the specified file. (Usually can be saved to the requir...
Use PIP bulk update If you encounter an installation error, you can uninstall the error package, then continue the batch update....
Pip install additional packages with upgrades installed to tabulate bag, for example Pypi official website to view the presentation tabulate the package and found tabulate 0.7.6 supports the beautific...
List all expired libraries pip list --outdated Single update library name pip install --upgrade library name Batch update...
Today saw the system environment, a lot of python libraries have been updated, and then the old repository may no longer fit, they want all the libraries have been updated to the latest version. View ...