使用pip來安裝python包有時(shí)候安裝起來會(huì)非常慢,因此需要換成國內(nèi)的源來加速下載:
使用命令
以Torch為例:
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple torch
若無法連接
WARNING: The repository located at pypi.doubanio.com is not a trusted or secure host and is being ignored. If this repository is available via HTTPS we recommend you use HTTPS instead, otherwise you may silence this warning and allow it anyway with '--trusted-host pypi.doubanio.com'.
ERROR: Could not find a version that satisfies the requirement opencv-python (from versions: none)
ERROR: No matching distribution found for opencv-python
可以將源中的http改為https
需要user
Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/anaconda3/lib/python3.7/site-packages/llvmlite-0.28.0.dist-info'
Consider using the
--user
option or check the permissions.
需要加上--user:pip install 改為 pip install --user
pip install --user -i https://pypi.tuna.tsinghua.edu.cn/simple torch
審核編輯 hhy
-
python
+關(guān)注
關(guān)注
56文章
4807瀏覽量
85039
發(fā)布評論請先 登錄
相關(guān)推薦
【Banana Pi M1+試用體驗(yàn)】bananapi的pip安裝步驟及使用詳解
在linux中安裝pip命令
Linux的pip安裝步驟
pip 的超全使用指南
TensorFlow安裝手冊之如何利用pip安裝 TensorFlow
教程分享:Pip安裝如何使用國內(nèi)鏡像源
使用pip安裝、更新和卸載Python的第三方庫
pip安裝后仍有ImportError No module named XX問題解決
pip安裝報(bào)錯(cuò):Command python setup.py egg_info failed with error code 1
![<b class='flag-5'>pip</b><b class='flag-5'>安裝</b>報(bào)錯(cuò):Command python setup.py egg_info failed with error code 1](https://file.elecfans.com/web2/M00/8A/E5/pYYBAGO_uieAYU-QAADIw1NhCig646.png)
評論