tensorflow: TF 1.6 cannot be installed on MacOS because of failure in installing grpcio

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💯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 “<string>”, line 1, in <module> File “/private/tmp/pip-build-da0d116h/grpcio/setup.py”, line 311, in <module> 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/`

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 9
  • Comments: 35 (1 by maintainers)

Most upvoted comments

Thanks @sbl for discovering the problem

$ pip3 install grpcio==1.9.1 tensorflow

works

+1 on OSX 10.13.3 Python 3.6

fixed the problem by pip3 install grpcio==1.9.1 tensorflow

@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

Try install grpcio 1.09

$ pip3 install grpcio==1.09
$ pip3 install tensorflow

+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

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.