pip install [库名]==【版本号】 -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install -r request.txt
pip uninstall -y -r request.txt
pip freeze all >request.txt
pip install upgrade pip
pip show [包名] 查看安装路径
永久生效 在user下新建pip文件夹,新建pip.ini文件,保存以下内容
[global]
timeout = 6000
index-url = http://pypi.douban.com/simple
trusted-host = pypi.douban.com
设置pip源
pip3 config set global.index-url http://mirrors.aliyun.com/pypi/simple/
解决 【otherwise you may silence this warning and allow it anyway with '--trusted-host mirrors.aliyun.com'.】
- 在配置文件中添加以下内容 [root/.config/pip/pip.conf]
[global]
index-url = http://mirrors.aliyun.com/pypi/simple/
[install]
trusted-host=mirrors.aliyun.com