python3.7+win10 安裝tensorflow

win10+python 3.7 + Anaconda

一、安裝

第一步,下載與電腦版本對應的Anaconda,打開Anaconda Navigator,選擇環境,創建新環境,我用的是python3.7,選擇自己對應的版本。

          

 

第二步,打開prompt,輸入 activate tensorflow,切換到tensorflow 模式,繼續輸入conda install tensorflow。

activate tensorflow

conda install tensorflow

 

二、驗證

如果沒什麼問題,切換到python模式,驗證一下。

 

三、問題

此次安裝我斷斷續續花了好長時間,也用了很多方法進行安裝,遇到過許多問題。將部分問題進行總結。

1.pip版本更新失敗

python -m pip install --upgrade pip

有可能失敗,多試幾次,或者直接卸載,重新下載就是最新版本的了。

2.tensorflow下載速度太慢太慢,可以參考一下方法:

pip install tensorflow -i https://pypi.douban.com/simple

參考博客https://blog.csdn.net/lixuminglxm/article/details/81386521

 

3.ERROR: twisted 18.7.0 requires PyHamcrest>=1.9.0, which is not installed

參考博客:https://blog.csdn.net/HPU_CPD/article/details/91492550?locationNum=5&fps=1

我剛開始下載了出現ERROR: Twisted-19.10.0-cp38-cp38-win_amd64.whl is not a supported wheel on this platform.問題,原來是版本不一樣,查看了一下我的python是3.7版本,所以需要下載cp37版本的。

成功了

 

4.ERROR: Cannot uninstall 'wrapt'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

pip install -U --ignore-installed wrapt

5.一定要保證你的python版本跟tensorflow環境的版本一致。

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章