Pip、poetry设置国内清华源
pip临时使用源
pip install -i https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple some-package
设置默认源
python -m pip install --upgrade pip
pip config set global.index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
配置备用源
pip config set global.extra-index-url "<url1> <url2>..."
poetry设置当前项目源
poetry source add --priority=primary mirrors https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple/
设置额外源
poetry source add --priority=supplemental mirrors https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple/
参考链接:
https://mirrors.tuna.tsinghua.edu.cn/help/pypi/
阅读剩余
版权声明:
作者:konoha
链接:https://konoha.cc/pip-poetry%e8%ae%be%e7%bd%ae%e5%9b%bd%e5%86%85%e6%b8%85%e5%8d%8e%e6%ba%90.html
文章版权归作者所有,未经允许请勿转载。
THE END