代码改变世界

安装tensorflow报错ERROR: Could not install packages due to an EnvironmentError

2020-04-07 13:53  雄风狂飙  阅读(1144)  评论(0)    收藏  举报

ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: 'C:\\Users\\yangpengbo\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python38\\site-packages\\tensorflow_estimator\\python\\estimator\\canned\\linear_optimizer\\python\\utils\\__pycache__\\sharded_mutable_dense_hashtable.cpython-38.pyc'

 

解决办法:

设置HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control \ FileSystem @ LongPathsEnabled的值为1

注册表通过regedit来打开

 

 

错误:ImportError: DLL load failed while importing _pywrap_tensorflow_internal: 找不到指定的模块。

 

打算尝试从这里下载试试

https://github.com/fo40225/tensorflow-windows-wheel/blob/master/2.0.0/py37/CPU/avx2/tensorflow-2.0.0-cp37-cp37m-win_amd64.whl

 

pip install tensorflow-2.0.0-cp37-cp37m-win_amd64.whl