一、常用
常规 | pip install httpx |
指定源 | pip install -i https://pypi.tuna.tsinghua.edu.cn/simple httpx |
指定版本 | pip install -v httpx==0.22.0 |
使用代理 | pip install httpx --proxy='socks5://127.0.0.1:10808' |
报错:ERROR: Could not install packages due to an OSError: Missing dependencies for SOCKS support.
解决:pip install pysocks
二、其他
查看已安装包:
pip list
查看可升级的包
pip list -o
三、Windows下永久更改为清华源
Win+R 输入%AppData% 回车 在该文件夹中 创建pip文件夹,在pip文件中创建pip.ini文件并添加下面配置并保存
[global]
trusted-host=pypi.tuna.tsinghua.edu.cn/simple/
index-url=https://pypi.tuna.tsinghua.edu.cn/simple/