安装 Tensorflow 时,它说我丢失了一个文件,但我不知道如何修复它或获取该文件
我已尝试重新下载 python,但仍然缺少该文件
pip install Tensorflow
我想要的是完成安装。 这是错误消息:
C:\Users\MYUSER\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\tensorflow_estimator\python\estimator\canned\linear_optimizer\python\utils\__pycache__\sharded_mutable_dense_hashtable.cpython-37.pyc'
最佳答案
这是一个典型的 Windows 长文件路径问题。禁用 MAX_PATH
限制;相关说明可以例如被发现here :
3.1.2. Removing the MAX_PATH Limitation
Windows historically has limited path lengths to 260 characters. This meant that paths longer than this would not resolve and errors would result.
In the latest versions of Windows, this limitation can be expanded to approximately 32,000 characters. Your administrator will need to activate the “Enable Win32 long paths” group policy, or set the registry value
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem@LongPathsEnabled
to1
.
之后,重新启动并重试安装。
关于python - 安装Tensorflow时出现环境错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57727782/