2
votes

I'm trying to install Tensorflow on a Win 10 machine.

I installed Python (3.7) successfully and then tried to followed the installation instructions on tensorflow.org.

When executing

pip install tensorflow

I get the following error message:

ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: 'C:\Users\XXX\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\tensorboard\_vendor\tensorflow_serving\sources\storage_path\__pycache__\file_system_storage_path_source_pb2.cpython-37.pyc'

Can anyone help? Thanks!

1
Try to run the command line with administrator privileges.Péter Leéh
Opened CMD with administrator privileges. Didn't help.Philipp
Do you have anaconda installed in your systemLakshmi - Intel
Does this answer your question?Péter Leéh

1 Answers

4
votes

The reason is that the Max_path limitation has not removed. You can read information about it from 3.1.2 on https://docs.python.org/3.7/using/windows.html. I meet the same trouble as you did and I solve it by setting the registry value HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem@LongPathsEnabled to 1. You can do it by Win+R, and type regedit and you can change the setting above. Hope my answer works for you.