serving not supported python3?
i'm using python3 to complie serving ,everything is ok but when i followed the tutorial to test mnist bazel-bin/tensorflow_serving/example/mnist_saved_model /tmp/mnist_model i got imported error! no mock module found,but i'm sure i have installed mock, this confused me a long time! finnally i found i'm using python3 not python2,after i installed pip2 packege under python2,and pip2 installed mock, my problem solved! what a joy!! when i run python tensorflow_serving/example/mnist_client.py --num_tests=1000 --server=localhost:9000 error again! then i use python2 tensorflow_serving/example/mnist_client.py --num_tests=1000 --server=localhost:9000 error solved again! now i summarize that most tutorial codes or examples are run under python2 not supported python3(may be partially supported!) then i hope that serving or it's examples or tutorials can fully supported python3,may be it's a huge hard work! thank you !!
@DIT4FUN , hi As far as I know in python 3 'mock' is a 'unittest.mock'.
Serving is supported by python3 (I can confirm that as I've built my custom configuration with Tensorflow Serving Model), however most of tutorials are written using python2.
Before you build the any bazel binaries in tensorflow/serving, do the following:
- change 'py2' to 'py3'
- change '/usr/bin/python' to path that your python3 interpreter use (you can find it out if you run 'which python3' in terminal) https://github.com/tensorflow/serving/blob/master/tools/bazel.rc
Good luck :)
Duplicate of #700