TensorFlow installation denied due to user permissions

idan picture idan · May 10, 2018 · Viewed 7.6k times · Source

I tried to run tensorflow on Jupiter netbook, python 2.7 but I realized it requiered 3.6 pythong version so I followed this steps :

Installing with Anaconda

Create a conda environment named tensorflow by invoking the following command:

C:> conda create -n tensorflow pip python=3.5

Activate the conda environment by issuing the following command:

C:> activate tensorflow

(tensorflow)C:> # Your prompt should change Issue the appropriate command to install TensorFlow inside your conda environment. To install the CPU-only version of TensorFlow, enter the following command:

(tensorflow)C:> pip install --ignore-installed --upgrade tensorflow

To install the GPU version of TensorFlow, enter the following command (on a single line):

(tensorflow)C:> pip install --ignore-installed --upgrade tensorflow-gpu 

**

  • But this line of code

**

(tensorflow)C:> pip install --ignore-installed --upgrade tensorflow 

Show me the this error:

Could not install packages due to an EnvironmentError: [WinError 5] Access is denied: 'C:\Users\idan\AppData\Local\Continuum\anaconda2\envs\tensorflow\Lib\site-packages\numpy\.libs\libopenblas.BNVRK7633HSX7YVO2TADGR4A5KEKXJAW.gfortran-win_amd64.dll' Consider using the --user option or check the permissions.

I tried to change user permission and also open anaconda cmd as administrator but it doesn't help.

Answer

Akash Goyal picture Akash Goyal · May 10, 2018

This answer has the necessary information for the pip permission error. It can be resolved with the --user flag, which is a conservative approach.

There is another way to install tensorflow for conda-environment. Write below on the Anaconda Command Prompt after activating environment.

conda install tensorflow

Test it :

python import tensorflow as tf

And it should work.