Skip to content

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

Closed

Description

@wfs

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.

Activity

  1. ptc-swalk commented on Jul 15, 2016

    @ptc-swalk

    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.

  2. wfs commented on Jul 15, 2016

    @wfs
    Author

    Great! Thanks very much @ptc-swalk.

  3. hamza-sadruddin commented on Mar 18, 2017

    @hamza-sadruddin

    Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions