Environmental Error occurs while installing Tensorflow

徘徊边缘 提交于 2020-06-01 07:47:25

问题


When installing Tensorflow it said I was missing a file but i dont know how to fix it and or get that file

I have tried re-downloading python but I am still missing the file

pip install Tensorflow

What I want is for the installation to complete. Here is the error message:

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'


回答1:


This is a typical Windows problem with long file paths. Disable the MAX_PATH limitation; the instruction for that can e.g. be found 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.

After that, reboot and retry the installation.




回答2:


When installing Tensorflow it said I was missing a file but i don't know how to fix it and or get that file.

Create a environment using anaconda.

This Problem can be solved by execute the Below commands:

conda update anaconda
conda create -n tensorflow pip python=3.5
conda install --force html5lib
activate tensorflow
pip install --ignore-installed --upgrade tensorflow
conda install -c conda-forge tensorflow
conda install jupyter

Refer this https://www.tensorflow.org/tutorials

Finally you can able to install Tensorflow.

I hope it will help you.



来源:https://stackoverflow.com/questions/57727782/environmental-error-occurs-while-installing-tensorflow

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!