摘自:https://blog.csdn.net/qq_31443999/article/details/88750833
win10安裝TensorFlow卡崩
更改為國內清華大學鏡像源,即可。
具體做法
在c:\user(或者用戶)\電腦的用戶名\,目錄下創建一個命名為“pip”的文件夾(如:C:\Users\Administrator\pip),在該文件夾下創建一個命名為“pip.ini”的文件,在該文件中寫入以下內容:
[global] index-url=https://pypi.tuna.tsinghua.edu.cn/simple [install] trusted-host=pypi.tuna.tsinghua.edu.cn disable-pip-version-check = true timeout = 6000
若是想在安裝package的時候再設置源,可以以這種方式來進行:
pip install package_name -i https://pypi.tuna.tsinghua.edu.cn/simple
解決Python 下載包慢的問題 本文鏈接:https://blog.csdn.net/du_lun/article/details/89945694 阿里雲 http://mirrors.aliyun.com/pypi/simple/ 中國科技大學 https://pypi.mirrors.ustc.edu.cn/simple/ 豆瓣(douban) http://pypi.douban.com/simple/ 清華大學 https://pypi.tuna.tsinghua.edu.cn/simple/ 中國科學技術大學 http://pypi.mirrors.ustc.edu.cn/simple/ pip install tensorflow -i http://pypi.douban.com/simple --trusted-host pypi.douban.com