平時pip安裝偶爾會下載速度過慢
可以使用以下網(wǎng)站進行下載
豆瓣:http://pypi.douban.com/simple/
清華大學(xué):https://pypi.tuna.tsinghua.edu.cn/simple/
中國科技大學(xué):https://pypi.mirrors.ustc.edu.cn/simple/
阿里云:https://mirrors.aliyun.com/pypi/simple/
百度:https://mirror.baidu.com/pypi/simple
?
假設(shè)我們需要安裝名為numpy的Python包。
使用默認源安裝numpy
pip install numpy
使用清華大學(xué)鏡像源,重新安裝numpy
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple/ numpy
或者
pip install numpy -i https://pypi.tuna.tsinghua.edu.cn/simple
在電腦上安裝了多個版本的Python時,確實可能需要指定特定版本的 pip
來安裝包。通常,這可以通過以下幾種方法實現(xiàn):文章來源:http://www.zghlxwxcb.cn/news/detail-808347.html
1. 使用完整路徑
E:\Python39\Scripts\pip.exe install package_name
文章來源地址http://www.zghlxwxcb.cn/news/detail-808347.html
到了這里,關(guān)于python常用pip安裝源網(wǎng)址的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!