当前位置:网站首页>pip common commands and changing source files

pip common commands and changing source files

2022-08-09 10:45:00 Fuzzy Pack

We know:

Command format

pip's download update command is.: very important

pip install/update/upgrade [optional command] Source location package filename[==version, default latest ]

Explanation

  1. install/update/upgrade: Choose to download or update or [update with surrounding dependencies].The first two are actions for this package, and upgrada is not so simple, for example
    Note: upgrade is forbidden, use less
$ pip upgrade tensorflow

Many people think this code is just an update of tensorflow, but it's not. It also includes numpy and padas even if you don't know itAll packages are updated to the latest.
2. [optional command]:

-i: specify the installation source of the library-U: upgrade The package that was already installed will not be installed with a new version without U, and will be updated to the latest version with U.
  1. Source location
    For example, the following example: download from Tsinghua source.
# Install tensorflow from Tsinghua with version number 1.14pip install -i https://pypi.tuna.tsinghua.edu.cn/simple tensorflow-gpu==1.14.0
  1. [==version, latest by default]
    The above example is to download the 1.14.0 version of tensorflow-gpu

For a big example:

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --upgrade tensorflow-gpu==1.14.0
原网站

版权声明
本文为[Fuzzy Pack]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/221/202208091041530522.html