2

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.

idan
  • 1,508
  • 5
  • 29
  • 60

2 Answers2

5

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.

Akash Goyal
  • 1,273
  • 10
  • 15
  • I already import Tendorflow and already install Tensorflow but this what I get in Jupiter : ImportError: Could not find 'nvcuda.dll'. TensorFlow requires that this DLL be installed in a directory that is named in your %PATH% environment variable. Typically it is installed in 'C:\Windows\System32'. If it is not present, ensure that you have a CUDA-capable GPU with the correct driver installed. – idan May 10 '18 at 11:30
  • Also I found nvcuda.dll file on the internet and added it to 'C:\Windows\System32' but nothing happend – idan May 10 '18 at 11:32
  • Have you installed CUDA ? If you have a GPU machine with CUDA drivers installed, then you need to run . Its better to first test a pure CPU version, and then go for setting GPU version – Akash Goyal May 10 '18 at 11:33
  • Yes, "cuda_9.1.85_win10" installed but it show me " this graphic drivers could not find compatible graphics hardware – idan May 10 '18 at 12:03
  • Your question was specific to tensorflow installation; so I have answered in that context only. And if you will install tensorflow according to my answer, it will help you have better boundaries for different versions of tensorflow on a single machine. According to the community rules I think you should create a new question for this cuda error. – Akash Goyal May 10 '18 at 12:19
  • Solved by adding --user like this : pip install --ignore-installed --upgrade tensorflow – idan May 10 '18 at 18:33
0

I had the similar problem. The following solved mine.

Try updating the LD_LIBRARY_PATH using the following:

sudo ldconfig /usr/local/cuda/lib64

I found the solution from https://abdel.me/2017/09/28/aws-ami-deep-learning-keras/