今天在Windows下通過Pycharm安裝Tensorflow時遇到兩個問題:
使用pip安裝其實原理都相同,只不過Pycharm是圖形化的過程!
1、由於使用國外源總是導致Timeout
解決方法是在Pycharm中添加清華源 https://mirrors.aliyun.com/pypi/simple/(或者其他的國內源)
2、替換成清華源后安裝報錯:
ERROR: Could not find a version that satisfies the requirement tensorflow (from versions: none) ERROR: No matching distribution found for tensorflow
產生原因:
- Tensoflow僅僅支持Python 3.5和Python 3.6。
- Tensoflow僅僅支持64位版本的Python。
解決方法:安裝對應版本的Python
可以看到Tensorflow已經安裝成功
有個問題是這樣通過Pycharm安裝默認是2.0.0版本,我在Pycharm中沒有看到選擇安裝版本的功能,如果需要安裝1.x.x版本的可以在命令行用pip安裝:
pip3 install tensorflow==1.13.1 -i https://pypi.tuna.tsinghua.edu.cn/simple