Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tensorflow anaconda : pip install fails in newly created python 2.7 environment #3324

Closed
wfs opened this issue Jul 15, 2016 · 3 comments
Closed

Comments

@wfs
Copy link

wfs commented Jul 15, 2016

Environment info

Operating System:
(tf) :~/anaconda3/bin$ cat /proc/version
Linux version 4.4.0-31-generic (buildd@lgw01-16) (gcc version 5.3.1 20160413 (Ubuntu 5.3.1-14ubuntu2.1) ) #50-Ubuntu SMP Wed Jul 13 00:07:12 UTC 2016

Steps to reproduce

  1. Follow https://www.tensorflow.org/versions/r0.9/get_started/os_setup.html#anaconda-installation
  2. :~/anaconda3/bin$ ./conda create --name tf python=2
    Fetching package metadata .......
    Solving package specifications: ..........

Package plan for installation in environment /home/paddlescoot/anaconda3/envs/tf:

The following packages will be downloaded:

package build
python-2.7.12 1 12.1 MB
setuptools-23.0.0 py27_0 455 KB
wheel-0.29.0 py27_0 81 KB
pip-8.1.2 py27_0 1.5 MB
------------------------------------------------------------
                                       Total:        14.1 MB

The following NEW packages will be INSTALLED:

openssl:    1.0.2h-1     
pip:        8.1.2-py27_0 
python:     2.7.12-1     
readline:   6.2-2        
setuptools: 23.0.0-py27_0
sqlite:     3.13.0-0     
tk:         8.5.18-0     
wheel:      0.29.0-py27_0
zlib:       1.2.8-3      

Proceed ([y]/n)? y

Fetching packages ...
python-2.7.12- 100%
setuptools-23. 100%
wheel-0.29.0-p 100%
pip-8.1.2-py27 100%

Extracting packages ...
Linking packages ...

:/anaconda3/bin$ source activate tf
(tf) :
/anaconda3/bin$ ./conda info --envs

conda environments:

tf * /home/paddlescoot/anaconda3/envs/tf
root /home/paddlescoot/anaconda3

(tf) :~/anaconda3/bin$ python --version
Python 2.7.12 :: Continuum Analytics, Inc.

(tf) :~/anaconda3/bin$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.9.0-cp27-none-linux_x86_64.whl

(tf) :~/anaconda3/bin$ pip install --upgrade $TF_BINARY_URL
Collecting tensorflow==0.9.0 from https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.9.0-cp27-none-linux_x86_64.whl
Downloading https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.9.0-cp27-none-linux_x86_64.whl (27.6MB)
100% |████████████████████████████████| 27.6MB 52kB/s
Collecting numpy>=1.8.2 (from tensorflow==0.9.0)
Downloading numpy-1.11.1-cp27-cp27mu-manylinux1_x86_64.whl (15.3MB)
100% |████████████████████████████████| 15.3MB 90kB/s
Collecting six>=1.10.0 (from tensorflow==0.9.0)
Using cached six-1.10.0-py2.py3-none-any.whl
Collecting protobuf==3.0.0b2 (from tensorflow==0.9.0)
Using cached protobuf-3.0.0b2-py2.py3-none-any.whl
Requirement already up-to-date: wheel in /home/paddlescoot/anaconda3/envs/tf/lib/python2.7/site-packages (from tensorflow==0.9.0)
Collecting setuptools (from protobuf==3.0.0b2->tensorflow==0.9.0)
Downloading setuptools-24.0.3-py2.py3-none-any.whl (441kB)
100% |████████████████████████████████| 450kB 1.3MB/s
Installing collected packages: numpy, six, setuptools, protobuf, tensorflow
Found existing installation: setuptools 23.0.0
Cannot remove entries from nonexistent file /home/paddlescoot/anaconda3/envs/tf/lib/python2.7/site-packages/easy-install.pth

(tf) :~/anaconda3/bin$ python
Python 2.7.12 |Continuum Analytics, Inc.| (default, Jul 2 2016, 17:42:40)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://anaconda.org

import tensorflow as tf
Traceback (most recent call last):
File "", line 1, in
ImportError: No module named tensorflow
quit()

(tf) :~/anaconda3/bin$ ls -ali /home/paddlescoot/anaconda3/envs/tf/lib/python2.7/site-packages/
numpy/ pip/ README setuptools.pth six.py wheel/
numpy-1.11.1.dist-info/ pip-8.1.2-py2.7.egg-info/ setuptools-23.0.0-py2.7.egg six-1.10.0.dist-info/ six.pyc wheel-0.29.0-py2.7.egg-info/

(tf) :~/anaconda3/bin$ ls -ali /home/paddlescoot/anaconda3/envs/tf/lib/python2.7/site-packages/
numpy/ pip/ README setuptools.pth six.py wheel/
numpy-1.11.1.dist-info/ pip-8.1.2-py2.7.egg-info/ setuptools-23.0.0-py2.7.egg six-1.10.0.dist-info/ six.pyc wheel-0.29.0-py2.7.egg-info/

What have you tried?

  1. Searching for similar issues.
@ptc-swalk
Copy link

ptc-swalk commented Jul 15, 2016

This is not a TF bug, it's an anaconda thing. See ContinuumIO/anaconda-issues#542 - this is one of the reasons I don't use anaconda anymore, it doesn't play nice with pip and its main selling points (package management and environments) now come bundled with python ...

As a workaround, do pip install --ignore-installed --upgrade pip setuptools before installing TF via pip.

@wfs
Copy link
Author

wfs commented Jul 15, 2016

Great! Thanks very much @ptc-swalk.

@hamza-sadruddin
Copy link

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants