python - 安装Tensorflow时出现环境错误

标签 python tensorflow pip python-3.7

安装 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 to 1.

之后,重新启动并重试安装。

关于python - 安装Tensorflow时出现环境错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57727782/

相关文章:

Python pip 在 Linux mint 上不起作用

python - "list-like"对象是否有官方或常识标准最小接口(interface)?

python - pyopengl设置多 channel 纹理混合模式

python - 如何成功安装mysqlclient

python - 隐藏状态与 Tensorflow 的 dynamic_rnn 返回的最终状态

python - 制作自定义 Keras 层时无法使用未知的输入 Dims(批量大小)

python - pip找不到opencv

python [:] notation and range

python - tf.zeros() 是否返回 tf.get_variable()?

python - 如何在 Python 3.6 上安装 PIP?