The_Martian
The_Martian

Reputation: 3767

Tensorflow installation on Ubuntu permission error

I installed virtual box on my Windows 10 machine and installed Ubuntu on the virtual box. Then I installed Tensorflow on Ubuntu by following this instructions from Tensorflow.org. Everything went well including pip install and stuff but when I run $ pip install tensorflow I run into permission error as the screenshot shows. enter image description here

This error is not described in the install errors listed on Tensorflow.org at the bottom of that step 2. How do I solve that?

Upvotes: 1

Views: 558

Answers (3)

TwiN
TwiN

Reputation: 1911

I ran into the same problem and found the answer on Github.

The mistake I make was that Anaconda was installed with sudo ./<install script> instead of the correct command bash <install script> as noted on the download page. This made some files root-owned.

Upvotes: 0

The_Martian
The_Martian

Reputation: 3767

As is with most Linux flavors, if you run into permission related errors just add sudo in front of the command and enter the password to confirm you have admin privileges. In this case simply type sudo pip istall tensorflow. But since the ubuntu also comes with the latest 3.N version of python it is better to do sudo pip3 install tensorflow.

Upvotes: 0

robertoia
robertoia

Reputation: 2361

It seems like you need elevated permissions to write to /usr/local/lib.

Executing sudo pip install tensorflow will install tensorflow using root privileges.

(Also, your problem is with Ubuntu, not with Windows 10! Your host system has no influence in the permissions of the guest.)

Upvotes: 1

Related Questions