Error importing tensorflow in anaconda on Mac OSX

风格不统一 提交于 2021-01-20 20:24:11

问题


I am trying to import tensorflow using python and anaconda on Mac OSX 10.11.6 (El Capitan). I have followed the instructions on tensorflow.org relating to installation with anaconda as follows:

conda create -n tensorflow pip python=3.6
source activate tensorflow
sudo -H pip3 install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.10.0-py3-none-any.whl

And then starting python, and typing import tensorflow, produces an error:

ImportError: dlopen(/anaconda3/envs/tensorflow/lib/python3.6/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so, 6): Symbol not found: _SecKeyCopyExternalRepresentation

Followed by more similar errors which resulted in a failure to load the native tensorflow runtime.

Any assistance would be much appreciated!


回答1:


I had the same error message while installing TensorFlow. I was also using OSX 10.11.6. I got past that step by upgrading OSX. I was tipped off that this was necessary because a few lines farther down on the error message that you posted (after the dlopen part), it mentioned that the libraries had been compiled for a later version of OSX (10.12). When I upgraded to OSX 10.13, that error message went away.

If you're getting the same error in your error message, this will probably get you past that part.



来源:https://stackoverflow.com/questions/51765519/error-importing-tensorflow-in-anaconda-on-mac-osx

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!