Reputation: 513
I'm trying to install tensorflow from source on a Gentoo system (I think I need to do this to get it to use CUDA 9.1).
I'm able to build tensorflow, and then install it as a user with:
pip3 install --no-cache-dir --user /tmp/tensorflow_pkg/tensorflow-1.6.0rc1-cp35-cp35m-linux_x86_64.whl
When I try to import tensorflow I get:
>RuntimeError Traceback (most recent call last)
>RuntimeError: module compiled against API version 0xc but this version of numpy is 0xb
>
>ImportError Traceback (most recent call last)
>ImportError: numpy.core.multiarray failed to import
>
>ImportError Traceback (most recent call last)
>ImportError: numpy.core.umath failed to import
>
>ImportError Traceback (most recent call last)
>ImportError: numpy.core.umath failed to import
So my guess is that tensorflow was built against a different version of numpy than my system default (1.13.3).
The question is how to fix it? There's a lot about this process that's unfamiliar to me, so I would be grateful for any pointers in doing any of the following:
Any help appreciated!
Upvotes: 4
Views: 4839
Reputation: 513
Someone I always figure out how to do something the second after I post on SO! I installed into a virtualenv and did pip3 install --upgrade numpy
in the virtualenv. All appears to be well...
Upvotes: 6