6

It appears that El Capitan's system integrity protection is preventing me from following the instructions for getting Tensorflow running on OSX.

I've followed the installation guide but the final install step fails:

sudo pip install --upgrade $TF_BINARY_URL

fails with:

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

I've managed to get past that by ignoring the installation of six:

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

But now testing my installation does not work:

$ 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

1 Answer 1

5

I managed to get it working by using easy_install to upgrade numpy. This seems like a nasty mess so I'd love to either hear a better solution, or have someone explain to me why this is fine.

The command, for those playing along:

sudo easy_install numpy
2
  • 1
    I had the same issue using numpy with CV2. The error suggests version 10 (0xa) is required, so I tried pip install "numpy==1.10.1" with no luck. Finally, easy_install worked! Would be great to know why.
    – oortCloud
    Sep 29, 2016 at 8:22
  • Specifying the upgrade with sudo easy_install --upgrade numpy worked for me.
    – U W
    Jul 12, 2017 at 20:04

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.