Getting permission denied error while installing tensorflow and keras

1.7k views Asked by At

After following the steps from my previously asked question Can I implement deep learning models in my laptop with intel hd graphics I am getting a permission denied error while installing tensorflow

error13

What can I do to install tensorflow and keras without getting this error?

2

There are 2 answers

2
Maximilian Peters On BEST ANSWER

pip3 is trying to access /usr/bin/ for which you need superuser rights. Try

sudo pip3 install --upgrade ...
0
mrry On

It appears that TensorFlow depends on a newer version of the setuptools package than you have installed. As Maximilian points out, pip needs root access to upgrade setuptools and install TensorFlow and Keras in your machine's Python distribution. You can either use sudo as he suggests, or it may be safer to install TensorFlow into a Virtualenv. For example, to create a Virtualenv in the directory ~/tensorflow, execute the following commands:

$ sudo pip install virtualenv
$ virtualenv --system-site-packages ~/tensorflow
$ cd ~/tensorflow
$ source bin/activate
$ pip install https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.12.0-cp27-none-linux_x86_64.whl