问题
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.
回答1:
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.
回答2:
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/
来源:https://stackoverflow.com/questions/50271291/tensorflow-installation-denied-due-to-user-permissions