Install Tensorflow on Ubuntu

Hi,
Please, how can fix this error:

(myvenv)root@graphene-121:~# pip install --upgrade tensorflow
Downloading/unpacking tensorflow
  Cannot fetch index base URL Simple index
  Could not find any downloads that satisfy the requirement tensorflow
Cleaning up...
No distributions at all found for tensorflow
Storing debug log for failure in /root/.pip/pip.log
(myvenv)root@graphene-121:~# pip -V
pip 1.5.4 from /root/myvenv/local/lib/python2.7/site-packages (python 2.7)
(myvenv)root@graphene-121:~# python -V
Python 2.7.6
(myvenv)root@graphene-121:~#

Bests.

Maybe try validating your tensorflow install first?

Try:

# Python
import tensorflow as tf
hello = tf.constant('Hello, TensorFlow!')
sess = tf.Session()
print(sess.run(hello))

Did you get the output?

Hello, TensorFlow!
1 Like
root@graphene-99:~# vim hi.py
root@graphene-99:~# python hi.py
Traceback (most recent call last):
  File "hi.py", line 1, in <module>
    import tensorflow as tf
ImportError: No module named tensorflow

Looks like tensorflow might not be installed correctly.

Did you run?

pip show tensorflow

Maybe run what's above and post back the output?

I use this Install TensorFlow on Ubuntu | TensorFlow to install tensorflow

But, i have these errors:

(venv)root@graphene-99:~/tensorflow# pip install -U pip
Cannot fetch index base URL Simple index
Could not find any downloads that satisfy the requirement pip in
./venv/lib/python2.7/site-packages
Downloading/unpacking pip
Cleaning up...
No distributions at all found for pip in ./venv/lib/python2.7/site-packages
Storing debug log for failure in /root/.pip/pip.log
(venv)root@graphene-99:~/tensorflow# pip -V
pip 1.5.4 from /root/tensorflow/venv/local/lib/python2.7/site-packages
(python 2.7)
(venv)root@graphene-99:~/tensorflow# pip install -U tensorflow
Downloading/unpacking tensorflow
  Cannot fetch index base URL Simple index
  Could not find any downloads that satisfy the requirement tensorflow
Cleaning up...
No distributions at all found for tensorflow
Storing debug log for failure in /root/.pip/pip.log





Looks pretty clear that you should do a complete clean install; and if the install instructions you are using produce the same results; then find some better install instructions.

That would be my next move.

Please, how can i install Tensorflow ? I have used these commands but it doesn't work..

 sudo -H pip3 install tensorflow  --proxy https://XXX.XX.XX.X:3128
 
 sudo -E pip3 install tensorflow  --proxy https://XXX.XX.XX.X:3128  



sudo -E pip install tensorflow  --proxy https://XXX.XX.XX.X:3128  



sudo -H pip install tensorflow  --proxy https://XXX.XX.XX.X:3128  



sudo  pip install tensorflow  --proxy https://XXX.XX.XX.X:3128   



Downloading/unpacking tensorflow  Cannot fetch index base URL https://pypi.python.org/simple/   





(venv)root@graphene-62:~/tensorflow# pip -V pip 8.1.2 from /usr/local/lib/python2.7/dist-packages/pip-8.1.2-py2.7.egg (python 2.7) 



(venv)root@graphene-62:~/tensorflow# python -V Python 2.7.6 



(venv)root@graphene-62:~/tensorflow# uname -a Linux graphene-62 3.13.0-43-generic #72-Ubuntu SMP Mon Dec 8 19:35:06 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux (venv)root@graphene-62:~/tensorflow# uname -m x86_64 (venv)root@graphene-62:~/tensorflow#
 

Is there another way to download and install Tensorflow?
Kind regards.

You can install from the source on GIT:

https://www.tensorflow.org/install/install_sources
 git clone https://github.com/tensorflow/tensorflow 

etc etc.

Step-by-step.

1 Like

You can also try installing with Docker:

https://github.com/tensorflow/tensorflow/blob/master/tensorflow/tools/docker/README.md