[英]TensorFlow installation error on Mac
I want to use TensorFlow on my Mac with PyCharm, but when I use: 我想在我的Mac上用PyCharm使用TensorFlow,但是当我使用时:
pip install https://storage.googleapis.com/tensorflow/mac/tensorflow-0.5.0-py2-none-any.whl
it gives an error: 它给出了一个错误:
Exception:
Traceback (most recent call last):
File "/Users/urAD_Jeff/anaconda/lib/python2.7/site-packages/pip/basecommand.py", line 211, in main
status = self.run(options, args)
.
.
.
File "/Users/urAD_Jeff/anaconda/lib/python2.7/site-packages/pip/_vendor/requests/adapters.py", line 431, in send
raise SSLError(e, request=request)
SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)
How do I fix it? 我如何解决它?
I got it to install by running the following for a virtualenv setup recommended by the documentation 我通过运行以下内容来安装文档所推荐的virtualenv设置
brew install python
# On Mac:
$ sudo easy_install pip # If pip is not already installed
$ sudo pip install --upgrade virtualenv
$ virtualenv --system-site-packages ~/tensorflow
$ cd ~/tensorflow
$ source bin/activate # If using bash
$ source bin/activate.csh # If using csh
(tensorflow)$ # Your prompt should change
Download tensorflow from google getting the latest version using curl 从谷歌下载tensorflow使用curl获取最新版本
curl -O https://storage.googleapis.com/tensorflow/mac/tensorflow-0.5.0-py2-none-any.whl
Install the package you downloaded 安装您下载的软件包
pip install tensorflow-0.5.0-py2-none-any.whl
You should be able to type python
and try out tensorflow in a python terminal 您应该能够键入
python
并在python终端中尝试tensorflow
Another common issue in Mac while installing Tensor flow is Protobuf version. 安装Tensor流程时Mac中的另一个常见问题是Protobuf版本。
Please make sure you have protobuf 3.0.0a3 or above. 请确保您有protobuf 3.0.0a3或更高版本。
Thanks to Github Issue on Tensorflow To install using homebrew 感谢Tensorflow上的Github问题使用自制软件安装
brew install --devel protobuf
To verify, please run 要验证,请运行
pip show numpy protobuf
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.