Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TF 1.6 cannot be installed on MacOS because of failure in installing grpcio #17369

Closed
feranick opened this issue Mar 2, 2018 · 35 comments
Closed
Assignees

Comments

@feranick
Copy link
Contributor

feranick commented Mar 2, 2018

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): MacOS 10.13.3
  • TensorFlow installed from (source or binary): both
  • TensorFlow version (use command below): 1.6
  • Python version: 3.6.4
  • Bazel version (if compiling from source): 0.11
  • GCC/Compiler version (if compiling from source):
  • CUDA/cuDNN version: -
  • GPU model and memory: -
  • Exact command to reproduce:

On MacOS, type:
sudo pip3 install tensorflow
pip3 will start installing grpcio, but an error during the installation of grpcio (see below) will prevent the complete installation of tensorflow.

(This does not happen on TF 1.5, which doesn't seem to use grpcio)

Source code / logs

Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached. Try to provide a reproducible test case that is the bare minimum necessary to generate the problem.
`MacBook-Pro:grpc feranick$ sudo pip3 install --upgrade tensorflow
The directory '/Users/feranick/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/Users/feranick/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting tensorflow
Downloading tensorflow-1.6.0-cp36-cp36m-macosx_10_11_x86_64.whl (43.2MB)
100% |████████████████████████████████| 43.2MB 37kB/s
Requirement already up-to-date: absl-py>=0.1.6 in /opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from tensorflow)
Requirement already up-to-date: wheel>=0.26 in /opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from tensorflow)
Requirement already up-to-date: termcolor>=1.1.0 in /opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from tensorflow)
Requirement already up-to-date: astor>=0.6.0 in /opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from tensorflow)
Requirement already up-to-date: protobuf>=3.4.0 in /opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from tensorflow)
Requirement already up-to-date: six>=1.10.0 in /opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from tensorflow)
Requirement already up-to-date: tensorboard<1.7.0,>=1.6.0 in /opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from tensorflow)
Requirement already up-to-date: gast>=0.2.0 in /opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from tensorflow)
Requirement already up-to-date: numpy>=1.13.3 in /opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from tensorflow)
Collecting grpcio>=1.8.6 (from tensorflow)
Downloading grpcio-1.10.0.tar.gz (14.0MB)
100% |████████████████████████████████| 14.0MB 110kB/s
Requirement already up-to-date: setuptools in /opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from protobuf>=3.4.0->tensorflow)
Requirement already up-to-date: html5lib==0.9999999 in /opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from tensorboard<1.7.0,>=1.6.0->tensorflow)
Requirement already up-to-date: bleach==1.5.0 in /opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from tensorboard<1.7.0,>=1.6.0->tensorflow)
Requirement already up-to-date: werkzeug>=0.11.10 in /opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from tensorboard<1.7.0,>=1.6.0->tensorflow)
Requirement already up-to-date: markdown>=2.6.8 in /opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from tensorboard<1.7.0,>=1.6.0->tensorflow)
Installing collected packages: grpcio, tensorflow
Running setup.py install for grpcio ... error
Complete output from command /opt/local/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6 -u -c "import setuptools, tokenize;file='/private/tmp/pip-build-da0d116h/grpcio/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-m90opqn_-record/install-record.txt --single-version-externally-managed --compile:
Found cython-generated files...
running install
running build
running build_py
running build_project_metadata
creating python_build
creating python_build/lib.macosx-10.13-x86_64-3.6
creating python_build/lib.macosx-10.13-x86_64-3.6/grpc
copying src/python/grpcio/grpc/_channel.py -> python_build/lib.macosx-10.13-x86_64-3.6/grpc
copying src/python/grpcio/grpc/_common.py -> python_build/lib.macosx-10.13-x86_64-3.6/grpc
copying src/python/grpcio/grpc/init.py -> python_build/lib.macosx-10.13-x86_64-3.6/grpc
copying src/python/grpcio/grpc/_utilities.py -> python_build/lib.macosx-10.13-x86_64-3.6/grpc
copying src/python/grpcio/grpc/_plugin_wrapping.py -> python_build/lib.macosx-10.13-x86_64-3.6/grpc
copying src/python/grpcio/grpc/_interceptor.py -> python_build/lib.macosx-10.13-x86_64-3.6/grpc
copying src/python/grpcio/grpc/_grpcio_metadata.py -> python_build/lib.macosx-10.13-x86_64-3.6/grpc
copying src/python/grpcio/grpc/_server.py -> python_build/lib.macosx-10.13-x86_64-3.6/grpc
copying src/python/grpcio/grpc/_auth.py -> python_build/lib.macosx-10.13-x86_64-3.6/grpc
creating python_build/lib.macosx-10.13-x86_64-3.6/grpc/beta
copying src/python/grpcio/grpc/beta/_server_adaptations.py -> python_build/lib.macosx-10.13-x86_64-3.6/grpc/beta
copying src/python/grpcio/grpc/beta/interfaces.py -> python_build/lib.macosx-10.13-x86_64-3.6/grpc/beta
copying src/python/grpcio/grpc/beta/_metadata.py -> python_build/lib.macosx-10.13-x86_64-3.6/grpc/beta
copying src/python/grpcio/grpc/beta/init.py -> python_build/lib.macosx-10.13-x86_64-3.6/grpc/beta
copying src/python/grpcio/grpc/beta/utilities.py -> python_build/lib.macosx-10.13-x86_64-3.6/grpc/beta
copying src/python/grpcio/grpc/beta/implementations.py -> python_build/lib.macosx-10.13-x86_64-3.6/grpc/beta
copying src/python/grpcio/grpc/beta/_client_adaptations.py -> python_build/lib.macosx-10.13-x86_64-3.6/grpc/beta
creating python_build/lib.macosx-10.13-x86_64-3.6/grpc/framework
copying src/python/grpcio/grpc/framework/init.py -> python_build/lib.macosx-10.13-x86_64-3.6/grpc/framework
creating python_build/lib.macosx-10.13-x86_64-3.6/grpc/_cython
copying src/python/grpcio/grpc/_cython/init.py -> python_build/lib.macosx-10.13-x86_64-3.6/grpc/_cython
creating python_build/lib.macosx-10.13-x86_64-3.6/grpc/framework/foundation
copying src/python/grpcio/grpc/framework/foundation/callable_util.py -> python_build/lib.macosx-10.13-x86_64-3.6/grpc/framework/foundation
copying src/python/grpcio/grpc/framework/foundation/abandonment.py -> python_build/lib.macosx-10.13-x86_64-3.6/grpc/framework/foundation
copying src/python/grpcio/grpc/framework/foundation/init.py -> python_build/lib.macosx-10.13-x86_64-3.6/grpc/framework/foundation
copying src/python/grpcio/grpc/framework/foundation/stream.py -> python_build/lib.macosx-10.13-x86_64-3.6/grpc/framework/foundation
copying src/python/grpcio/grpc/framework/foundation/stream_util.py -> python_build/lib.macosx-10.13-x86_64-3.6/grpc/framework/foundation
copying src/python/grpcio/grpc/framework/foundation/future.py -> python_build/lib.macosx-10.13-x86_64-3.6/grpc/framework/foundation
copying src/python/grpcio/grpc/framework/foundation/logging_pool.py -> python_build/lib.macosx-10.13-x86_64-3.6/grpc/framework/foundation
creating python_build/lib.macosx-10.13-x86_64-3.6/grpc/framework/common
copying src/python/grpcio/grpc/framework/common/style.py -> python_build/lib.macosx-10.13-x86_64-3.6/grpc/framework/common
copying src/python/grpcio/grpc/framework/common/cardinality.py -> python_build/lib.macosx-10.13-x86_64-3.6/grpc/framework/common
copying src/python/grpcio/grpc/framework/common/init.py -> python_build/lib.macosx-10.13-x86_64-3.6/grpc/framework/common
creating python_build/lib.macosx-10.13-x86_64-3.6/grpc/framework/interfaces
copying src/python/grpcio/grpc/framework/interfaces/init.py -> python_build/lib.macosx-10.13-x86_64-3.6/grpc/framework/interfaces
creating python_build/lib.macosx-10.13-x86_64-3.6/grpc/framework/interfaces/face
copying src/python/grpcio/grpc/framework/interfaces/face/init.py -> python_build/lib.macosx-10.13-x86_64-3.6/grpc/framework/interfaces/face
copying src/python/grpcio/grpc/framework/interfaces/face/utilities.py -> python_build/lib.macosx-10.13-x86_64-3.6/grpc/framework/interfaces/face
copying src/python/grpcio/grpc/framework/interfaces/face/face.py -> python_build/lib.macosx-10.13-x86_64-3.6/grpc/framework/interfaces/face
creating python_build/lib.macosx-10.13-x86_64-3.6/grpc/framework/interfaces/base
copying src/python/grpcio/grpc/framework/interfaces/base/init.py -> python_build/lib.macosx-10.13-x86_64-3.6/grpc/framework/interfaces/base
copying src/python/grpcio/grpc/framework/interfaces/base/utilities.py -> python_build/lib.macosx-10.13-x86_64-3.6/grpc/framework/interfaces/base
copying src/python/grpcio/grpc/framework/interfaces/base/base.py -> python_build/lib.macosx-10.13-x86_64-3.6/grpc/framework/interfaces/base
creating python_build/lib.macosx-10.13-x86_64-3.6/grpc/_cython/_cygrpc
copying src/python/grpcio/grpc/_cython/_cygrpc/init.py -> python_build/lib.macosx-10.13-x86_64-3.6/grpc/_cython/_cygrpc
creating python_build/lib.macosx-10.13-x86_64-3.6/grpc/_cython/_credentials
copying src/python/grpcio/grpc/_cython/_credentials/roots.pem -> python_build/lib.macosx-10.13-x86_64-3.6/grpc/_cython/_credentials
running build_ext
b'[C] Compiling third_party/cares/cares/ares__close_sockets.c\n[C] Compiling third_party/cares/cares/ares__get_hostent.c\n[C] Compiling third_party/cares/cares/ares__read_line.c\n[C] Compiling third_party/cares/cares/ares__timeval.c\n[C] Compiling third_party/cares/cares/ares_cancel.c\n[C] Compiling third_party/cares/cares/ares_create_query.c\n[C] Compiling third_party/cares/cares/ares_data.c\n[C] Compiling third_party/cares/cares/ares_destroy.c\n[C] Compiling third_party/cares/cares/ares_expand_name.c\n[C] Compiling third_party/cares/cares/ares_expand_string.c\n[C] Compiling third_party/cares/cares/ares_fds.c\n[C] Compiling third_party/cares/cares/ares_free_hostent.c\n[C] Compiling third_party/cares/cares/ares_free_string.c\n[C] Compiling third_party/cares/cares/ares_getenv.c\n[C] Compiling third_party/cares/cares/ares_gethostbyaddr.c\n[C] Compiling third_party/cares/cares/ares_gethostbyname.c\n[C] Compiling third_party/cares/cares/ares_getnameinfo.c\n[C] Compiling third_party/cares/cares/ares_getopt.c\n[C] Compiling third_party/cares/cares/ares_getsock.c\n[C] Compiling third_party/cares/cares/ares_init.c\n[C] Compiling third_party/cares/cares/ares_library_init.c\n[C] Compiling third_party/cares/cares/ares_llist.c\n[C] Compiling third_party/cares/cares/ares_mkquery.c\n[C] Compiling third_party/cares/cares/ares_nowarn.c\n[C] Compiling third_party/cares/cares/ares_options.c\n[C] Compiling third_party/cares/cares/ares_parse_a_reply.c\n[C] Compiling third_party/cares/cares/ares_parse_aaaa_reply.c\n[C] Compiling third_party/cares/cares/ares_parse_mx_reply.c\n[C] Compiling third_party/cares/cares/ares_parse_naptr_reply.c\n[C] Compiling third_party/cares/cares/ares_parse_ns_reply.c\n[C] Compiling third_party/cares/cares/ares_parse_ptr_reply.c\n[C] Compiling third_party/cares/cares/ares_parse_soa_reply.c\n[C] Compiling third_party/cares/cares/ares_parse_srv_reply.c\n[C] Compiling third_party/cares/cares/ares_parse_txt_reply.c\n[C] Compiling third_party/cares/cares/ares_platform.c\n[C] Compiling third_party/cares/cares/ares_process.c\n[C] Compiling third_party/cares/cares/ares_query.c\n[C] Compiling third_party/cares/cares/ares_search.c\n[C] Compiling third_party/cares/cares/ares_send.c\n[C] Compiling third_party/cares/cares/ares_strcasecmp.c\n[C] Compiling third_party/cares/cares/ares_strdup.c\n[C] Compiling third_party/cares/cares/ares_strerror.c\n[C] Compiling third_party/cares/cares/ares_timeout.c\n[C] Compiling third_party/cares/cares/ares_version.c\n[C] Compiling third_party/cares/cares/ares_writev.c\n[C] Compiling third_party/cares/cares/bitncmp.c\n[C] Compiling third_party/cares/cares/inet_net_pton.c\n[C] Compiling third_party/cares/cares/inet_ntop.c\n[C] Compiling third_party/cares/cares/windows_port.c\n[AR] Creating /private/tmp/pip-build-da0d116h/grpcio/libs/opt/libares.a\n[C] Compiling src/boringssl/err_data.c\n'
b"In file included from src/boringssl/err_data.c:18:\nIn file included from /opt/local/include/openssl/err.h:115:\n/opt/local/include/openssl/e_os2.h:276:11: error: 'OPENSSL_EXPORT' macro redefined [-Werror,-Wmacro-redefined]\n# define OPENSSL_EXPORT extern\n ^\nthird_party/boringssl/include/openssl/base.h:178:9: note: previous definition is here\n#define OPENSSL_EXPORT\n ^\nIn file included from src/boringssl/err_data.c:18:\nIn file included from /opt/local/include/openssl/err.h:122:\n/opt/local/include/openssl/ossl_typ.h:83:31: error: redefinition of typedef 'ASN1_INTEGER' is a C11 feature [-Werror,-Wtypedef-redefinition]\ntypedef struct asn1_string_st ASN1_INTEGER;\n ^\nthird_party/boringssl/include/openssl/base.h:253:31: note: previous definition is here\ntypedef struct asn1_string_st ASN1_INTEGER;\n ^\nIn file included from src/boringssl/err_data.c:18:\nIn file included from /opt/local/include/openssl/err.h:122:\n/opt/local/include/openssl/ossl_typ.h:84:31: error: redefinition of typedef 'ASN1_ENUMERATED' is a C11 feature [-Werror,-Wtypedef-redefinition]\ntypedef struct asn1_string_st ASN1_ENUMERATED;\n ^\nthird_party/boringssl/include/openssl/base.h:249:31: note: previous definition is here\ntypedef struct asn1_string_st ASN1_ENUMERATED;\n ^\nIn file included from src/boringssl/err_data.c:18:\nIn file included from /opt/local/include/openssl/err.h:122:\n/opt/local/include/openssl/ossl_typ.h:85:31: error: redefinition of typedef 'ASN1_BIT_STRING' is a C11 feature [-Werror,-Wtypedef-redefinition]\ntypedef struct asn1_string_st ASN1_BIT_STRING;\n ^\nthird_party/boringssl/include/openssl/base.h:247:31: note: previous definition is here\ntypedef struct asn1_string_st ASN1_BIT_STRING;\n ^\nIn file included from src/boringssl/err_data.c:18:\nIn file included from /opt/local/include/openssl/err.h:122:\n/opt/local/include/openssl/ossl_typ.h:86:31: error: redefinition of typedef 'ASN1_OCTET_STRING' is a C11 feature [-Werror,-Wtypedef-redefinition]\ntypedef struct asn1_string_st ASN1_OCTET_STRING;\n ^\nthird_party/boringssl/include/openssl/base.h:254:31: note: previous definition is here\ntypedef struct asn1_string_st ASN1_OCTET_STRING;\n ^\nIn file included from src/boringssl/err_data.c:18:\nIn file included from /opt/local/include/openssl/err.h:122:\n/opt/local/include/openssl/ossl_typ.h:87:31: error: redefinition of typedef 'ASN1_PRINTABLESTRING' is a C11 feature [-Werror,-Wtypedef-redefinition]\ntypedef struct asn1_string_st ASN1_PRINTABLESTRING;\n ^\nthird_party/boringssl/include/openssl/base.h:255:31: note: previous definition is here\ntypedef struct asn1_string_st ASN1_PRINTABLESTRING;\n ^\nIn file included from src/boringssl/err_data.c:18:\nIn file included from /opt/local/include/openssl/err.h:122:\n/opt/local/include/openssl/ossl_typ.h:88:31: error: redefinition of typedef 'ASN1_T61STRING' is a C11 feature [-Werror,-Wtypedef-redefinition]\ntypedef struct asn1_string_st ASN1_T61STRING;\n ^\nthird_party/boringssl/include/openssl/base.h:257:31: note: previous definition is here\ntypedef struct asn1_string_st ASN1_T61STRING;\n ^\nIn file included from src/boringssl/err_data.c:18:\nIn file included from /opt/local/include/openssl/err.h:122:\n/opt/local/include/openssl/ossl_typ.h:89:31: error: redefinition of typedef 'ASN1_IA5STRING' is a C11 feature [-Werror,-Wtypedef-redefinition]\ntypedef struct asn1_string_st ASN1_IA5STRING;\n ^\nthird_party/boringssl/include/openssl/base.h:252:31: note: previous definition is here\ntypedef struct asn1_string_st ASN1_IA5STRING;\n ^\nIn file included from src/boringssl/err_data.c:18:\nIn file included from /opt/local/include/openssl/err.h:122:\n/opt/local/include/openssl/ossl_typ.h:90:31: error: redefinition of typedef 'ASN1_GENERALSTRING' is a C11 feature [-Werror,-Wtypedef-redefinition]\ntypedef struct asn1_string_st ASN1_GENERALSTRING;\n ^\nthird_party/boringssl/include/openssl/base.h:251:31: note: previous definition is here\ntypedef struct asn1_string_st ASN1_GENERALSTRING;\n ^\nIn file included from src/boringssl/err_data.c:18:\nIn file included from /opt/local/include/openssl/err.h:122:\n/opt/local/include/openssl/ossl_typ.h:91:31: error: redefinition of typedef 'ASN1_UNIVERSALSTRING' is a C11 feature [-Werror,-Wtypedef-redefinition]\ntypedef struct asn1_string_st ASN1_UNIVERSALSTRING;\n ^\nthird_party/boringssl/include/openssl/base.h:259:31: note: previous definition is here\ntypedef struct asn1_string_st ASN1_UNIVERSALSTRING;\n ^\nIn file included from src/boringssl/err_data.c:18:\nIn file included from /opt/local/include/openssl/err.h:122:\n/opt/local/include/openssl/ossl_typ.h:92:31: error: redefinition of typedef 'ASN1_BMPSTRING' is a C11 feature [-Werror,-Wtypedef-redefinition]\ntypedef struct asn1_string_st ASN1_BMPSTRING;\n ^\nthird_party/boringssl/include/openssl/base.h:248:31: note: previous definition is here\ntypedef struct asn1_string_st ASN1_BMPSTRING;\n ^\nIn file included from src/boringssl/err_data.c:18:\nIn file included from /opt/local/include/openssl/err.h:122:\n/opt/local/include/openssl/ossl_typ.h:93:31: error: redefinition of typedef 'ASN1_UTCTIME' is a C11 feature [-Werror,-Wtypedef-redefinition]\ntypedef struct asn1_string_st ASN1_UTCTIME;\n ^\nthird_party/boringssl/include/openssl/base.h:260:31: note: previous definition is here\ntypedef struct asn1_string_st ASN1_UTCTIME;\n ^\nIn file included from src/boringssl/err_data.c:18:\nIn file included from /opt/local/include/openssl/err.h:122:\n/opt/local/include/openssl/ossl_typ.h:94:31: error: redefinition of typedef 'ASN1_TIME' is a C11 feature [-Werror,-Wtypedef-redefinition]\ntypedef struct asn1_string_st ASN1_TIME;\n ^\nthird_party/boringssl/include/openssl/base.h:258:31: note: previous definition is here\ntypedef struct asn1_string_st ASN1_TIME;\n ^\nIn file included from src/boringssl/err_data.c:18:\nIn file included from /opt/local/include/openssl/err.h:122:\n/opt/local/include/openssl/ossl_typ.h:95:31: error: redefinition of typedef 'ASN1_GENERALIZEDTIME' is a C11 feature [-Werror,-Wtypedef-redefinition]\ntypedef struct asn1_string_st ASN1_GENERALIZEDTIME;\n ^\nthird_party/boringssl/include/openssl/base.h:250:31: note: previous definition is here\ntypedef struct asn1_string_st ASN1_GENERALIZEDTIME;\n ^\nIn file included from src/boringssl/err_data.c:18:\nIn file included from /opt/local/include/openssl/err.h:122:\n/opt/local/include/openssl/ossl_typ.h:96:31: error: redefinition of typedef 'ASN1_VISIBLESTRING' is a C11 feature [-Werror,-Wtypedef-redefinition]\ntypedef struct asn1_string_st ASN1_VISIBLESTRING;\n ^\nthird_party/boringssl/include/openssl/base.h:262:31: note: previous definition is here\ntypedef struct asn1_string_st ASN1_VISIBLESTRING;\n ^\nIn file included from src/boringssl/err_data.c:18:\nIn file included from /opt/local/include/openssl/err.h:122:\n/opt/local/include/openssl/ossl_typ.h:97:31: error: redefinition of typedef 'ASN1_UTF8STRING' is a C11 feature [-Werror,-Wtypedef-redefinition]\ntypedef struct asn1_string_st ASN1_UTF8STRING;\n ^\nthird_party/boringssl/include/openssl/base.h:261:31: note: previous definition is here\ntypedef struct asn1_string_st ASN1_UTF8STRING;\n ^\nIn file included from src/boringssl/err_data.c:18:\nIn file included from /opt/local/include/openssl/err.h:122:\n/opt/local/include/openssl/ossl_typ.h:98:31: error: redefinition of typedef 'ASN1_STRING' is a C11 feature [-Werror,-Wtypedef-redefinition]\ntypedef struct asn1_string_st ASN1_STRING;\n ^\nthird_party/boringssl/include/openssl/base.h:256:31: note: previous definition is here\ntypedef struct asn1_string_st ASN1_STRING;\n ^\nIn file included from src/boringssl/err_data.c:18:\nIn file included from /opt/local/include/openssl/err.h:122:\n/opt/local/include/openssl/ossl_typ.h:99:13: error: redefinition of typedef 'ASN1_BOOLEAN' is a C11 feature [-Werror,-Wtypedef-redefinition]\ntypedef int ASN1_BOOLEAN;\n ^\nthird_party/boringssl/include/openssl/base.h:242:13: note: previous definition is here\ntypedef int ASN1_BOOLEAN;\n ^\nIn file included from src/boringssl/err_data.c:18:\nIn file included from /opt/local/include/openssl/err.h:122:\n/opt/local/include/openssl/ossl_typ.h:100:13: error: redefinition of typedef 'ASN1_NULL' is a C11 feature [-Werror,-Wtypedef-redefinition]\ntypedef int ASN1_NULL;\n ^\nthird_party/boringssl/include/openssl/base.h:243:13: note: previous definition is here\ntypedef int ASN1_NULL;\n ^\nfatal error: too many errors emitted, stopping now [-ferror-limit=]\n20 errors generated.\nmake: *** [/private/tmp/pip-build-da0d116h/grpcio/objs/opt/src/boringssl/err_data.o] Error 1\n"
Traceback (most recent call last):
File "", line 1, in
File "/private/tmp/pip-build-da0d116h/grpcio/setup.py", line 311, in
cmdclass=COMMAND_CLASS,
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/init.py", line 129, in setup
return distutils.core.setup(**attrs)
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/command/install.py", line 61, in run
return orig.install.run(self)
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/command/install.py", line 545, in run
self.run_command('build')
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/command/build_ext.py", line 78, in run
_build_ext.run(self)
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/Cython/Distutils/old_build_ext.py", line 186, in run
_build_ext.build_ext.run(self)
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/command/build_ext.py", line 339, in run
self.build_extensions()
File "/private/tmp/pip-build-da0d116h/grpcio/src/python/grpcio/commands.py", line 278, in build_extensions
raise Exception("make command failed!")
Exception: make command failed!

----------------------------------------

Command "/opt/local/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6 -u -c "import setuptools, tokenize;file='/private/tmp/pip-build-da0d116h/grpcio/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-m90opqn_-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/tmp/pip-build-da0d116h/grpcio/`

@ljllili23
Copy link

me too. failed to install v1.6 on OSX 10.12.6 because of the same issue.

@bryantkhoo
Copy link

Same here, I'm also on OSX 10.12.6 with the same issue.

@krishnan-prabhu
Copy link

Failed for me too. I am on OSX 10.13.3.

@lunersonguo
Copy link

+1 on OSX 10.12.6

@holtc
Copy link

holtc commented Mar 2, 2018

+1 on OSX 10.12.6 as well, Python 2.7

@zhedongzheng
Copy link

me too

@shreystechtips
Copy link

shreystechtips commented Mar 2, 2018

me as well... (on macOS 10.13.3 MBP 2015) python 3.6

@jeffwang0516
Copy link

same issue on OSX 10.13.3, python3.6

@rijieli
Copy link

rijieli commented Mar 2, 2018

macOS 10.13.3 Python 3.6 same problem.

@sbl
Copy link
Contributor

sbl commented Mar 2, 2018

The issue is related to grpcio v1.10.0 (https://github.com/grpc/grpc/releases/tag/v1.10.0) not being able to build.

If you install don't do pip install -U tensorflow (which will try to also update grpcio). Instead: pip install tensorflow==1.6.0 and you should be fine.

@zhedongzheng
Copy link

zhedongzheng commented Mar 2, 2018

Thanks @sbl for discovering the problem

$ pip3 install grpcio==1.9.1 tensorflow

works

@rijieli
Copy link

rijieli commented Mar 2, 2018

Try install grpcio 1.09

$ pip3 install grpcio==1.09
$ pip3 install tensorflow

@bluesjjw
Copy link

bluesjjw commented Mar 2, 2018

+1 on OSX 10.13.3 Python 3.6

fixed the problem by
pip3 install grpcio==1.9.1 tensorflow

@thebillington
Copy link

+1 on OSX 10.11.6 Python 3.6.1

pip3 install grpcio==1.9.1 tensorflow

@droidresearch
Copy link

+1

If you are installing it freshly for the first time
install grpcio==1.9.1 tensorflow
will work

If you are trying to upgrade tensorflow from existing version,
pip install tensorflow==1.6.0
will work

@krishnan-prabhu
Copy link

Thank you.

pip install grpcio==1.9.1 tensorflow worked for me.

@repentsinner
Copy link

repentsinner commented Mar 3, 2018

Just a heads up that a MacOS wheel for grpcio 1.10.0 is now on pypi as of today so the default TF dependencies (grpcio = "*") once again work fine. Backed out the grpcio = "1.9.1" here and pipenv no longer fails to install TF.

See grpc/grpc#14573 and https://pypi.python.org/pypi/grpcio/1.10.0

Thanks to @mehrdada for the quick work on resolving this!

@simothejudge
Copy link

I still have an error:

Could not find a version that satisfies the requirement tensorflow==1.6.0 (from versions: )
No matching distribution found for tensorflow==1.6.0

To install TensorFlow Python Package I had to use the URL (invoked pip version<8.1), which was this one:
https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.6.0-py2-none-any.whl
So for me the normal command doesn't work anyway.

@duboyal
Copy link

duboyal commented Apr 3, 2018

(tensorflow) AlexandrasMBP3:tensorFlow Alexandra$ pip3 install grpcio==1.9.1 tensorflow
Collecting grpcio==1.9.1
Using cached grpcio-1.9.1-cp36-cp36m-macosx_10_7_intel.whl
Collecting tensorflow
Could not find a version that satisfies the requirement tensorflow (from versions: )
No matching distribution found for tensorflow
(tensorflow) AlexandrasMBP3:tensorFlow Alexandra$

STILL GETTING THIS ERROR! :( please help

@anujgupta82
Copy link

anujgupta82 commented Apr 4, 2018

@simothejudge @duboyal : try

For MAC

   For python 2.X
   pip install grpcio==1.9.1 https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.6.0-py2-none-any.whl

   For python 3.X
   pip install grpcio==1.9.1 https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.6.0-py3-none-any.whl

This worked for me

@michaelisard
Copy link

Closing because the issue seems understood, but please reopen if you think there's something we should change.

@djcerbero
Copy link

I'm sorry for reopening this but I'm still getting the same error! even with
pip install grpcio==1.9.1 https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.6.0-py3-none-any.whl
Anybody can help? Thanks a lot.

@rrodriguezperez
Copy link

@djcerbero you can try pip install --no-cache-dir --only-binary :all: grpcio==1.10.0rc1 before pip install --upgrade tfBinaryURL It worked for me

@Speuce
Copy link

Speuce commented May 20, 2018

@djcerbero I'm having the same issue now, too.
@rrodriguezperez "No matching distribution found for grpcio==1.10.0rc1" after running the first piece of that. Yes I have the latest version of pip installed. This is inside the virtual python environment.
Help?

@djcerbero
Copy link

@Speuce I gave up and installed anaconda, everything went smooth.

@Murtowski
Copy link

python 3.7.0

insallation on MacOS
sudo pip3 install grpcio==1.9.1 --user --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.8.0-py3-none-any.whl

Still produces
Command "/Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7 -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-install-l8x9q309/grpcio/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/tmp/pip-record-g5bcv1gx/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /private/tmp/pip-install-l8x9q309/grpcio/

@anujgupta82
Copy link

anujgupta82 commented Jul 3, 2018

@GitHubMurt : Can you once try

    pip install grpcio==1.9.1 https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.6.0-py3-none-any.whl

Also why are you using sudo ?

@Murtowski
Copy link

Murtowski commented Jul 3, 2018

I use it preventively. I tired this but pip is incompatible with given http address py3

tensorflow-1.6.0-py3-none-any.whl is not a supported wheel on this platform.

@ibodi
Copy link

ibodi commented Jul 4, 2018

I have the same problem

@vistrcm
Copy link

vistrcm commented Jul 7, 2018

same problem

@mehrdada
Copy link

gRPC Python 3.7 64-bit binary wheels are uploaded to PyPI for macOS and Windows (as well as Linux which was previously available). Install should work even if you don't have the build dependencies for grpcio.

@mazz
Copy link

mazz commented Jul 19, 2018

mac:

cd src; mkdir tensorflow; cd tensorflow; python3 -m venv tf-test; cd tf-test

source bin/activate

curl https://bootstrap.pypa.io/get-pip.py | python

pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org grpcio

pip install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.9.0-py3-none-any.whl

@mehrdada
Copy link

@mazz Any reason you are forcing grpcio to 1.9.1? The current version 1.13.0 seems to install just fine.

@mazz
Copy link

mazz commented Jul 22, 2018

@mehrdada based upon an old post .. updated

@gamanox
Copy link

gamanox commented Sep 25, 2019

solved installing pkg-config on Mac
brew install pkg-config

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests