tensorflow: Unable to install Tensorflow on Windows - Anaconda error trace

I posted this issue on Stack Overflow, I seem to always have problems related to Anaconda dependencies, even related to my Mac. I’m on Python 3.6 which came with an auto-install when I installed Visual Studio. Do I just need to downgrade to get this to work? I’m also on the latest version of CUDA/cuDNN and have a TitanX.

I’m on a new PC deep learning rig now, and installed CUDA, afterward I ran some of the pip install commands. I received the error below.

python -m pip install --upgrade pip

Then this printed out:

Successfully built protobuf markdown html5lib Installing collected packages: protobuf, backports.weakref, html5lib, bleach, ma rkdown, tensorflow Exception: Traceback (most recent call last): File "C:\Program Files\Anaconda3\lib\site-packages\pip\basecommand.py", line 2 15, in main status = self.run(options, args) File "C:\Program Files\Anaconda3\lib\site-packages\pip\commands\install.py", l ine 342, in run prefix=options.prefix_path, File "C:\Program Files\Anaconda3\lib\site-packages\pip\req\req_set.py", line 7 84, in install **kwargs File "C:\Program Files\Anaconda3\lib\site-packages\pip\req\req_install.py", li ne 851, in install self.move_wheel_files(self.source_dir, root=root, prefix=prefix) File "C:\Program Files\Anaconda3\lib\site-packages\pip\req\req_install.py", li ne 1064, in move_wheel_files isolated=self.isolated, File "C:\Program Files\Anaconda3\lib\site-packages\pip\wheel.py", line 345, in move_wheel_files clobber(source, lib_dir, True) File "C:\Program Files\Anaconda3\lib\site-packages\pip\wheel.py", line 323, in clobber shutil.copyfile(srcfile, destfile) File "C:\Program Files\Anaconda3\lib\shutil.py", line 115, in copyfile with open(dst, 'wb') as fdst: PermissionError: [Errno 13] Permission denied: 'C:\\Program Files\\Anaconda3\\Li b\\site-packages\\protobuf-3.3.0-py3.6-nspkg.pth'

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 17 (3 by maintainers)

Most upvoted comments

If you are on windows, you usually need to start a terminal as an administrator. This is due to anaconda directories being only writable by administrator.

If you are in windows, Just open the Anaconda with Administrator privilege, that’s it

@Jose30 @gunan thanks for your help, it turns out that a lot of this stemmed from two issues:

  1. Had to delete extra dll files that were a part of 1-3 different Anaconda + Miniconda installs
  2. Reinstalling Numpy a few times.
  3. Adding CUDNN and Anaconda into my environment variables path.
  4. Having the wrong version of CUDNN installed (was on 6.0 instead of 5.1) which threw everything off.

Some best practices to remember: Run CMD as administrator (I forget this often on Windows bc Mac is just whatever).

@erinjerri the pip install --ignore-installed --upgrade <url> didn’t work for me either, so, what I end doing was installed locally downloading the wheel directly from the link provided in the Installation section:

*Windows GPU: Python 3.5 64-bit (build history) / Python 3.6 64-bit (build history)

Once I downloaded I used pip install --ignore-installed --upgrade <PC url> and the not supported wheel on this platform error didn’t appear again, unfortunately there where other error when i try to import tensorflow to my code. I try different things until I got frustrated and end going back to python 3.5.2 with anaconda 4.2.0. I also have a 64x win 10 and a CUDA compatible card.