Specify the source + specify the version when the pip3 install command is executed

1. Specify the source

usage:
pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple ${3rd_MODULE_NAME}

For example:

pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple koalas

2. Specify the version of the package when installing

pip install 包名==版本号

For example:

pip3 install MySQL-python==1.2.4

illustrate:

  1. If the package does not exist in the local pip3 library, the specified version of the package will be downloaded;
  2. If there are other versions of the package locally, delete the other version of the package first and then download the specified version of the package.
  3. If no version statement is added, the latest version of the package will be downloaded by default.
  4. In addition, == can also be replaced by <=, <, >=, >, etc. to specify the range.

Guess you like

Origin blog.csdn.net/liuwei0376/article/details/130837741