35

I'm getting installation error because pip couldn't find setup.py.

sudo pip install https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.5.0-cp27-none-linux_x86_64.whl

I get this error message.

Downloading/unpacking https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.5.0-cp27-none-linux_x86_64.whl
Downloading tensorflow-0.5.0-cp27-none-linux_x86_64.whl (10.9Mb): 10.9Mb downloaded
Running setup.py egg_info for package from https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.5.0-cp27-none-linux_x86_64.whl
Traceback (most recent call last):
File "<string>", line 14, in <module>
IOError: [Errno 2] No such file or directory: '/tmp/pip-GdGgbz-build/setup.py'
Complete output from command python setup.py egg_info:
Traceback (most recent call last):

File "<string>", line 14, in <module>

IOError: [Errno 2] No such file or directory: '/tmp/pip-GdGgbz-build/setup.py'

Can anyone tell me how to solve this problem?

Thanks.

whoisraibolt
  • 2,082
  • 3
  • 22
  • 45
  • what is the output of `sudo pip --version`? – cel Nov 10 '15 at 06:10
  • pip 1.1 from /home/username/tensorflow/lib/python2.7/site-packages/pip-1.1-py2.7.egg (python 2.7) – Zay Maung Maung Aye Nov 10 '15 at 06:28
  • Are you in a virtualenv? If so, why are you using `sudo`? Anyway, try updating `pip` – cel Nov 10 '15 at 06:32
  • I am using Ubuntu 12.04 amd64 and get the same error when installing tensorflow. The output of `sudo pip --version` is `pip 1.0 from /usr/lib/python2.7/dist-packages (python 2.7)`. I have not used `sudo` in the installation process. – user1129812 Nov 10 '15 at 14:47
  • 1
    Have you reported the problem to the issues list on the tensorflow github? https://github.com/tensorflow/tensorflow/issues – Robert Munafo Nov 10 '15 at 18:48
  • I have just reported my problem on tensorflow github. – user1129812 Nov 10 '15 at 23:18
  • From tensorflow github's answer, this issue is a duplicate of the issue [here](https://github.com/tensorflow/tensorflow/issues/56) and upgrading pip to the latest version would solve this issue. – user1129812 Nov 11 '15 at 01:23
  • 1
    I finally confirm that after using Ubuntu 15.10 desktop amd64 with python 2.7.10, python-dev and pip 1.5.6, tensorflow will be successfully installed using the pip method. – user1129812 Nov 11 '15 at 09:31
  • `pip 19.0.1 from /usr/local/lib/python2.7/dist-packages/pip-19.0.1-py2.7.egg/pip (python 2.7)` I have this pip version. But, I'm getting the same error. – Pramesh Bajracharya Feb 02 '19 at 14:12

5 Answers5

21

from https://github.com/tensorflow/tensorflow/issues/56

The command to type is "pip install --upgrade pip", and this should be added to the instructions right after where they tell the user to "source bin/activate"

pageman
  • 2,864
  • 1
  • 29
  • 38
3

Try upgrade protobuf with pip install:

sudo pip install --upgrade protobuf 
sudo pip install --upgrade https://storage.googleapis.com/tensorflow/mac/protobuf-3.0.0b2.post2-cp27-none-any.whl

worked for me. The documentation has provided many solutions for various installation problems.

ComeOnGetMe
  • 1,029
  • 9
  • 11
2

Tensorflow requires python -V 2.7. Since, lot of machine use the stable 2.6 version of python for their system build I would recommend parallel/alternative install of python 2.7. Then you can install pip with 2.7 version python interpreter. Please see below:

#sudo wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py
#sudo python2.7 ez_setup.py
#easy_install-2.7 pip
#sudo pip install https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.5.0-cp27-none-linux_x86_64.whl
gkc123
  • 512
  • 1
  • 7
  • 24
0

I'm using ubuntu 12.04 64bits. I solve this issue by:

mkdir -p ~/code/download/lib/tensorflow/
cd ~/code/download/lib/tensorflow/
virtualenv --system-site-packages tensorflow_for_ubuntu12_04_64bit_python2_7
source tensorflow_for_ubuntu12_04_64bit_python2_7/bin/activate
cd tensorflow_for_ubuntu12_04_64bit_python2_7
pip install --upgrade tensorflow
sam
  • 2,049
  • 3
  • 20
  • 27
0

the filename you are running sdist with must be named setup.py running the file as say setup_something.py will fail

oooiiiii
  • 302
  • 2
  • 11