When trying to install TensorFlow on my Windows 10 PC I was getting the following error.
C:\Users\peter.grant>pip3 install --upgrade tensorflow Collecting tensorflow Using cached tensorflow-1.4.0-cp35-cp35m-win_amd64.whl Exception: Traceback (most recent call last): File "c:\users\peter.grant\appdata\local\programs\python\python35\lib\shutil.py", line 387, in _rmtree_unsafe os.unlink(fullname) PermissionError: [WinError 5] Access is denied: 'C:\\Users\\PETER~1.GRA\\AppData\\Local\\Temp\\pip-hl4pb6zn-unpack\\tensorflow-1.4.0-cp35-cp35m-win_amd64.whl' During handling of the above exception, another exception occurred:
- Windows 10
- Python 3.5.4 64-bit
- TensofFlow 1.4.0
Turns out the solution was to run the following command to install (using the URL)
pip install –upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-0.12.1-cp35-cp35m-win_amd64.whl
Also ensure you use the above Python version (and make sure it’s 64-bit). I had to uninstall all versions and reinstall 3.5 to get this to work.