Win7系统安装tensorflow2.1.0报错解决方案
問題一:
Could not find the DLL(s) ‘msvcp140_1.dll’.TensorFlow requires that these DLLs be installed in a directory that is named in your %PATH% environment variable. You may install these DLLs by downloading “Microsoft C++ Redistributable for Visual Studio 2015,2017 and 2019” for your platform from this URL:https://support.microsoft.com/help/2977003/the-latest-supported-visual-c-downloads
解決辦法:
打開 網址我下載的是x64:vc_redist.x64.exe運行安裝完成之后重啟電腦即可解決。
問題二:
ModuleNotFoundError: No module named ‘tensorflow.python’
解決辦法:
由于我之前使用如下代碼進行TensorFlow的安裝
pip install --user tensorflow此時pip并沒有把tensorflow安裝在Python3的目錄里,而Python3.6中默認調用的是pip3安裝的包,所以導致其無法訪問。于是在cmd中執行命令:
pip uninstall tensorflow pip3 install --user tensorflow先卸載pip安裝的tensorflow,再用pip3重新安裝tensorflow即可。
問題三:
TypeError: A Message class can only inherit from Message
解決辦法:
在Spyde中找到Tools->Preferences->Python interpreter
將Enable UMR前的勾選去掉,然后重啟Spyder即可。
總結
以上是生活随笔為你收集整理的Win7系统安装tensorflow2.1.0报错解决方案的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Neuratron PhotoScore
- 下一篇: java信息管理系统总结_java实现科