tensorflow: Tensorflow is pulling enum34 in Python 3.5 and 3.6, which breaks code completion in Spyder

System information

  • Have I written custom code (as opposed to using a stock example script provided in TensorFlow): No
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Linux Ubuntu 17.04
  • TensorFlow installed from (source or binary): binary
  • TensorFlow version (use command below): 1.4.0
  • Python version: 3.5, 3.6
  • Bazel version (if compiling from source): N/A
  • GCC/Compiler version (if compiling from source): N/A
  • CUDA/cuDNN version: N/A
  • GPU model and memory: N/A
  • Exact command to reproduce: pip install tensorflow

Describe the problem

When you run

pip install tensorflow

in a virtualenv with Python 3.5 or 3.6, one of the dependencies pulled by pip is enum34, as the following console output shows

$ pip install tensorflow
Collecting tensorflow
  Downloading tensorflow-1.4.0-cp35-cp35m-manylinux1_x86_64.whl (40.7MB)
    100% |████████████████████████████████| 40.7MB 39kB/s 
Collecting numpy>=1.12.1 (from tensorflow)
  Using cached numpy-1.13.3-cp35-cp35m-manylinux1_x86_64.whl
Collecting six>=1.10.0 (from tensorflow)
  Using cached six-1.11.0-py2.py3-none-any.whl
Collecting protobuf>=3.3.0 (from tensorflow)
  Downloading protobuf-3.5.0.post1-cp35-cp35m-manylinux1_x86_64.whl (6.4MB)
    100% |████████████████████████████████| 6.4MB 217kB/s 
Requirement already satisfied: wheel>=0.26 in ./.virtualenvs/tf/lib/python3.5/site-packages (from tensorflow)
Collecting enum34>=1.1.6 (from tensorflow)
  Downloading enum34-1.1.6-py3-none-any.whl

This package is only necessary if Python < 3.4, as described here:

https://pypi.python.org/pypi/enum34/1.1.6

so it’s an error that tensorflow pullis it for Python 3.5 and 3.6.

Besides, this package breaks Spyder code completion machinery in its Editor, as it has been verified by several users. See for example:

spyder-ide/spyder#5782.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 8
  • Comments: 33 (22 by maintainers)

Most upvoted comments

Not sure whether it will help others but I managed to install Tensorflow as follows:

sudo pip install --ignore-installed tensorflow