環境:
python3.5.3+pycharm2018.2EAP
問題描述:
Pycharm編譯報錯
ImportError: No module named tensorflow
解決方法:
tensorflow安裝不正確,需卸載重裝,
cmd腳本輸入:pip uninstall tensorflow
同時最好把附帶的一些庫也卸了(tensorboard、tensorflow- estimator之類與tensorflow相關的庫)
同樣用pip uninstall xx的代碼
這邊注意一個問題:
安裝的tensorflow版本要與python版本匹配,這邊參考:
https://blog.csdn.net/wanzhen4330/article/details/81660277
對應python3.5.3,我安裝了tensorflow1.5.0,注意別裝到tensorflow2.0.0版本去了,不然會報錯:
could not find a version that satisfies the requrement
安裝完成后,編譯通過。
碼字不易,如果您覺得有幫助,麻煩點個贊再走唄~