The tensorflow-serving-api package is only published for python 2. It should also be published for python 3.
This makes following the tutorial impossible using python 3 - and the tutorial makes no note of the python 2 requirement.
Sorry, tf-serving only supports python 2. See https://github.com/tensorflow/serving/pull/685/files
The API package is just a collection of autogenerated classes from proto files. It already supports python 3 as-is, it just needs to be published as such.
I can confirm, that the package supports Python 3 (we're using it on Python 3.6 without any changes). Unfortunately, the package is tagged as Python2 only on PyPI, so it is not possible to simply run pip install ....
At this point we have to do:
.whl file from PyPItensorflow_serving/* to our Python3 project// EDIT: I think this issue should be re-openned. We have a year 2018, Python3 is the future.
Adding the --universal flag to this command should be sufficient to get the package labeled as cross-version:
python setup.py bdist_wheel --universal
I'm happy to submit a patch fixing the script, but I can't publish or verify on my own.
@illagrenan I Copy&Paste tensorflow_serving/* to my Python3 project, but No moudle named 'tensorflow_serving.session_bundle'.
Folks, the issue is that, at this time, we cannot sign up for the ongoing support of python 3. Please understand that although it may be "easy", for a variety of reasons the cost to us is not zero and we do have to limit our commitments. We will revisit this decision in the future.
To clarify: The request is that you label your existing, universal (Python3-compatible) build artifact as such.
We're asking for a label change, not an implementation change. The only Python3 support we're getting is from the gRPC project, not from TensorFlow.
hi ,when the python3 api will be published,thanks.
I think there was some misunderstanding - serving supports Python3, the only problem are tags on the PyPI (@jkinkead is right).
I have made Python3 compatible package (I only redistributed official Python package with Python3-compatible setup.py): https://github.com/illagrenan/tensorflow-serving-api-python3. You can now do this:
# Python3 package from https://pypi.python.org/pypi/tensorflow-serving-api-python3
pip install --upgrade tensorflow-serving-api-python3
I believe more people are using python3(especially new learners) and tensorflow also support python3 offically. Please consider making tensorflow serving available officially.
Thank you
we are using Python3, and trying to migrate Flask model server to Tensorflow model server, I believe most of other TF Serving users are also using python3, rather than python2.
Again, please try to support python3 officially, you know it will somehow impact the Go/NoGO decision for TF serving migration project.
THANK YOU!!!
@jasonzhang079 the client does support Python 3. You can literally just use the existing python 2 wheel - but you have to download it manually.
The bug here is opened because the TF serving team doesn't seem to understand how this works. pip isn't used internally at Google, so I think they're just unfamiliar with the system. It's literally just a single flag change in their build script, but I can't seem to get them to understand this. Makes me almost want to go back to work for them just to get this issue resolved. ;)
Google does not take care of this issue with half a year's time?
pip install tensorflow-serving-api-python3
How do I install tensorflow-model-server on macOS? Apparently instructions are there for apt-get and bazel. I'm getting this error when trying to install with bazel using this command bazel build -c opt tensorflow_serving/...
Any ideas @jkinkead ?
Beginning of the error:
ERROR: /private/var/tmp/_bazel_Sumanth/f07d738ca2f9eb67816d8a220b407e4d/external/org_tensorflow/tensorflow/python/BUILD:396:1: C++ compilation of rule '@org_tensorflow//tensorflow/python:py_util' failed (Exit 1)
In file included from external/org_tensorflow/tensorflow/python/lib/core/py_util.cc:20:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/locale:182:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__locale:492:15: error: C++ requires a type specifier for all declarations
char_type toupper(char_type __c) const
^
bazel-out/host/genfiles/external/local_config_python/python_include/pyport.h:731:29: note: expanded from macro 'toupper'
#define toupper(c) towupper(btowc(c))
^
In file included from external/org_tensorflow/tensorflow/python/lib/core/py_util.cc:20:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/locale:182:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__locale:498:48: error: too many arguments provided to function-like macro invocation
const char_type* toupper(char_type* __low, const char_type* __high) const
^
bazel-out/host/genfiles/external/local_config_python/python_include/pyport.h:731:9: note: macro 'toupper' defined here
#define toupper(c) towupper(btowc(c))
^
In file included from external/org_tensorflow/tensorflow/python/lib/core/py_util.cc:20:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/locale:182:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__locale:498:29: error: expected ';' at end of declaration list
const char_type* toupper(char_type* __low, const char_type* __high) const
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__locale:510:48: error: too many arguments provided to function-like macro invocation
const char_type* tolower(char_type* __low, const char_type* __high) const
^
bazel-out/host/genfiles/external/local_config_python/python_include/pyport.h:729:9: note: macro 'tolower' defined here
#define tolower(c) towlower(btowc(c))
^
In file included from external/org_tensorflow/tensorflow/python/lib/core/py_util.cc:20:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/locale:182:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/_locale:494:27: error: use of undeclared identifier '_c'
return do_toupper(__c);
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__locale:601:15: error: C++ requires a type specifier for all declarations
char_type toupper(char_type __c) const
^
bazel-out/host/genfiles/external/local_config_python/python_include/pyport.h:731:29: note: expanded from macro 'toupper'
#define toupper(c) towupper(btowc(c))
^
In file included from external/org_tensorflow/tensorflow/python/lib/core/py_util.cc:20:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/locale:182:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__locale:607:48: error: too many arguments provided to function-like macro invocation
const char_type* toupper(char_type* __low, const char_type* __high) const
^
bazel-out/host/genfiles/external/local_config_python/python_include/pyport.h:731:9: note: macro 'toupper' defined here
#define toupper(c) towupper(btowc(c))
^
In file included from external/org_tensorflow/tensorflow/python/lib/core/py_util.cc:20:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/locale:182:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__locale:607:29: error: expected ';' at end of declaration list
const char_type* toupper(char_type* __low, const char_type* __high) const
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__locale:619:48: error: too many arguments provided to function-like macro invocation
const char_type* tolower(char_type* __low, const char_type* __high) const
^
bazel-out/host/genfiles/external/local_config_python/python_include/pyport.h:729:9: note: macro 'tolower' defined here
#define tolower(c) towlower(btowc(c))
^
In file included from external/org_tensorflow/tensorflow/python/lib/core/py_util.cc:20:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/locale:182:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/_locale:603:27: error: use of undeclared identifier '_c'
return do_toupper(__c);
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__locale:729:21: error: too many arguments provided to function-like macro invocation
isspace(_CharT __c, const locale& __loc)
^
bazel-out/host/genfiles/external/local_config_python/python_include/pyport.h:725:9: note: macro 'isspace' defined here
#define isspace(c) iswspace(btowc(c))
^
In file included from external/org_tensorflow/tensorflow/python/lib/core/py_util.cc:20:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/locale:182:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__locale:729:1: error: declaration conflicts with target of using declaration already in scope
isspace(_CharT __c, const locale& __loc)
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/_ctype.h:267:1: note: target of using declaration
isspace(int _c)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cctype:113:9: note: using declaration
using ::isspace;
^
In file included from external/org_tensorflow/tensorflow/python/lib/core/py_util.cc:20:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/locale:182:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__locale:731:5: error: expected expression
return use_facet<ctype<CharT> >(_loc).is(ctype_base::space, __c);
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__locale:732:2: error: expected ';' at end of declaration
}
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__locale:753:21: error: too many arguments provided to function-like macro invocation
isupper(_CharT __c, const locale& __loc)
^
bazel-out/host/genfiles/external/local_config_python/python_include/pyport.h:727:9: note: macro 'isupper' defined here
#define isupper(c) iswupper(btowc(c))
^
In file included from external/org_tensorflow/tensorflow/python/lib/core/py_util.cc:20:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/locale:182:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__locale:753:1: error: declaration conflicts with target of using declaration already in scope
isupper(_CharT __c, const locale& __loc)
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/_ctype.h:273:1: note: target of using declaration
isupper(int _c)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cctype:114:9: note: using declaration
using ::isupper;
^
In file included from external/org_tensorflow/tensorflow/python/lib/core/py_util.cc:20:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/locale:182:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__locale:755:5: error: expected expression
return use_facet<ctype<CharT> >(_loc).is(ctype_base::upper, __c);
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__locale:756:2: error: expected ';' at end of declaration
}
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__locale:761:21: error: too many arguments provided to function-like macro invocation
islower(_CharT __c, const locale& __loc)
^
bazel-out/host/genfiles/external/local_config_python/python_include/pyport.h:723:9: note: macro 'islower' defined here
#define islower(c) iswlower(btowc(c))
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
INFO: Elapsed time: 5440.752s, Critical Path: 606.11s
INFO: 1671 processes, local.
FAILED: Build did NOT complete successfully
How do I install tensorflow-model-server on Windows10?
Most helpful comment
I think there was some misunderstanding -
servingsupports Python3, the only problem are tags on the PyPI (@jkinkead is right).I have made Python3 compatible package (I only redistributed official Python package with Python3-compatible
setup.py): https://github.com/illagrenan/tensorflow-serving-api-python3. You can now do this: