Essay – Specify an image when installing with PIP
When running a Python project, you often encounter no XXX module. At this time, you can use PIP to install the corresponding module. Some modules download quite quickly, but some are slow to download.
Specify an image when downloading with PIP:
-
Specify the tsinghua mirror: -i https://pypi.tuna.tsinghua.edu.cn/simple
-
Specify ali cloud mirror: -i https://mirrors.aliyun.com.pypi/simple
Generally use Tsinghua mirror image and Ali mirror image can be done. Record two more images so you can try it if you need to.
- Douban mirror image:
https://pypi.douban.com/simple/
- Baidu image:
https://mirror.baidu.com/pypi/simple/
Example:
- Install TensorFlow using Tsinghua Image:
PIP install tensorflow = = 2.3.0 -i https://pypi.tuna.tsinghua.edu.cn/simpleCopy the code
- Install TensorFlow using AliYun Image:
PIP install tensorflow = = 2.3.0 -i https://mirrors.aliyun.com.pypi/simpleCopy the code