Mac installs the latest TensorFlow encounters the pits that record the convenience of posterity

Source: Internet
Author: User
Tags install brew install openssl openssl openssl version

Before other Mac computer installation TensorFlow time All smooth, a line of command sudo pip install TensorFlow on high, but today on a new Mac installed TensorFlow when there is a bug, have a half a day finally finished ...

There's nothing on the internet to solve the problem, the egg ground, there is no relevant user po this issue, should be the new TensorFlow on the MAC support issues, nonsense not much said:

When Pip installs TensorFlow on Mac, all dependent packages are installed first

In the installation of the dependency package Grpcio time appears: (This is the Grpcio, the original tensorflow inside is not dependent on this, now only)

"" "DEPENDENCY ERROR

The target is trying to run requires an OpenSSL implementation.
Your system doesn ' t have one, and either the Third_party directory
Doesn ' t has it, or your compiler can ' t build Boringssl.

Consult INSTALL to get more information.

If You need information on why these tests failed, run:

Make Run_dep_checks
”“”
Show no OpenSSL on Mac system

Terminal knocks on OpenSSL version
Show Libressl

The Apple has abandoned OpenSSL on the internet, turning to Libressl, but it still needs OpenSSL when compiling grpcio.

Resolution:
1. Install BREW:/USR/BIN/RUBY-E "$ (curl-fssl https://raw.githubusercontent.com/Homebrew/install/master/install)"

2. Execution: Brew Install OpenSSL

3. Add environment variable: Echo ' Export path= '/usr/local/opt/openssl/bin: $PATH "' >> ~/.bash_profile

4. Perform the OpenSSL version again to display OpenSSL, perform which OpenSSL display/usr/local/opt/openssl/bin/openssl

5. Implementation: Export Ldflags=-l/usr/local/opt/openssl/lib;export Cppflags=-i/usr/local/opt/openssl/include, To have the compiler find the location of the library and header files at compile time

6. Re-execute sudo pip install Grpcio, problem solving

7. Execute sudo pip install tensorflow,ok!

Mac installs the latest TensorFlow encounters the pits that record the convenience of posterity

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.