安裝python包時通常使用pip install xxx 但是效率不高,下面介紹幾種國內的源,安裝效率提升一大截
阿里雲 http://mirrors.aliyun.com/pypi/simple/
中國科技大學 https://pypi.mirrors.ustc.edu.cn/simple/
豆瓣 http://pypi.douban.com/simple/
清華大學 https://pypi.tuna.tsinghua.edu.cn/simple/
中國科學技術大學 http://pypi.mirrors.ustc.edu.cn/simple/
在以上幾個國內的源安裝命令
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple xxx
我以清華鏡像爲例,例如大家需要安裝opencv-python這個包,只需將上面命令行中的 xxx 換成opencv-python即可
只要是源裏有的包,都會很快下載成功!