1. 程式人生 > >pip install換源

pip install換源

pypi換源總結

由於pypi源預設為國外源,經常被牆導致不可用,所以安裝軟體時pip源最好更換為國內資源

常用國內源:

使用方法

更換python安裝目錄下的源地址:將…\Lib\site-packages\pip\models\index.py檔案中的PyPI值修改為你希望的國源連結。如將其修改為清華源:

修改後安裝keras命令:pip install keras

Anaconda 清華映象使用

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --set show_channel_urls yes