2016-06-14 131 views
5

El Capitan的系统完整性保护似乎阻止我遵循在OSX上运行Tensorflow的说明。如何在El Capitan上安装tensorflow?

我已经按照the installation guide但最终的安装步骤失败:

sudo pip install --upgrade $TF_BINARY_URL 

失败:

Uninstalling numpy-1.8.0rc1: 
... 
OSError: [Errno 1] Operation not permitted 

我已经设法通过忽略六个安装闯过是:

sudo pip install --upgrade $TF_BINARY_URL --ignore-installed six 

但现在测试我的安装不起作用:

$ python 
Python 2.7.10 (default, Oct 23 2015, 19:19:21) 
[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.5)] on darwin 
Type "help", "copyright", "credits" or "license" for more information. 
>>> import tensorflow as tf 
RuntimeError: module compiled against API version 0xa but this version of numpy is 0x9 
Traceback (most recent call last): 
    File "<stdin>", line 1, in <module> 
.... 
ImportError: numpy.core.multiarray failed to import 

回答

4

我设法通过使用easy_install升级numpy来使它工作。这似乎是一个讨厌的混乱,所以我很想听到更好的解决方案,或有人向我解释为什么这很好。

的命令,对于那些一起演奏:

sudo easy_install numpy 
+1

我不得不使用numpy的与CV2相同的问题。错误建议版本10(0xa)是必需的,所以我尝试了pip安装“numpy == 1.10.1”,但没有运气。最后,easy_install工作!很高兴知道为什么。 – oortCloud

+0

用'sudo easy_install --upgrade numpy'指定升级为我工作。 – Serenthia

相关问题