tensorflow: Need Protobuf pip wheel package for Python 3.4, which is missing the setup doc

Current documentation only gives protobuf-3.0.0b2.post2-cp35-none-any.whl but nothing for python 3.4.

Environment info

Operating System: Mac OS X El Capitan 10.11.6

Installed version of CUDA and cuDNN: None (Intel Iris Graphics 6100)

If installed from binary pip package, provide: TF_BINARY_URL=https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-0.10.0rc0-py3-none-any.whl

pip package you installed: tensorflow-0.10.0rc0-py3-none-any.whl

Steps to reproduce

  1. Follow the Mac setup steps here
  2. Installation completed fine.
  3. Protobuf’s package is the pure python one, which is VERY SLOW. The setup guide only gives a pip wheel package for Python 3.5

What steps you have tried

$ pip3 install --upgrade https://storage.googleapis.com/tensorflow/mac/protobuf-3.0.0b2.post2-cp35-none-any.whl
protobuf-3.0.0b2.post2-cp35-none-any.whl is not a supported wheel on this platform.

$ pip3 install --upgrade https://storage.googleapis.com/tensorflow/mac/protobuf-3.0.0b2.post2-cp34-none-any.whl
Collecting protobuf==3.0.0b2.post2 from https://storage.googleapis.com/tensorflow/mac/protobuf-3.0.0b2.post2-cp34-none-any.whl
  HTTP error 404 while getting https://storage.googleapis.com/tensorflow/mac/protobuf-3.0.0b2.post2-cp34-none-any.whl
  Could not install requirement protobuf==3.0.0b2.post2 from https://storage.googleapis.com/tensorflow/mac/protobuf-3.0.0b2.post2-cp34-none-any.whl because of error 404 Client Error: Not Found for url: https://storage.googleapis.com/tensorflow/mac/protobuf-3.0.0b2.post2-cp34-none-any.whl
Could not install requirement protobuf==3.0.0b2.post2 from https://storage.googleapis.com/tensorflow/mac/protobuf-3.0.0b2.post2-cp34-none-any.whl because of HTTP error 404 Client Error: Not Found for url: https://storage.googleapis.com/tensorflow/mac/protobuf-3.0.0b2.post2-cp34-none-any.whl for URL https://storage.googleapis.com/tensorflow/mac/protobuf-3.0.0b2.post2-cp34-none-any.whl

About this issue

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

Most upvoted comments

That’s a good idea 😃 Let me share them here first:

All the instructions are in line with here, please see the page for all the prerequisites: https://github.com/google/protobuf/blob/master/src/README.md

Then I tried to run the following commands: git clone https://github.com/google/protobuf.git cd protobuf ./autogen.sh CXXFLAGS=“-fPIC -g -O2” ./configure make -j12 export PROTOC=$PWD/src/protoc cd python python3.4 setup.py bdist_wheel --cpp_implementation --compile_static_extension cd dist

The wheel file will be in the “dist” directory.

Unfortunately, just renaming the .whl file seems insufficient. You also have to rename <venv_path>/lib/python3.4/site-packages/google/protobuf/internal/_api_implementation.cpython-35m-darwin.so to <venv_path>/lib/python3.4/site-packages/google/protobuf/internal/_api_implementation.so. @gunan, perhaps it’s worth building a 3.4 specific protobuf package.

How can you verify that you actually have a C++ version of the protobuf library installed?

python -c "from google.protobuf.internal import api_implementation; print(api_implementation._default_implementation_type)"

still says python