-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot Import numpy.core.multiarray #19
Comments
I figured it out, I was using anaconda distro.. |
@Irtza Thanks! and sorry for the delay in getting back to you! |
@kirilg not a GPU specific problem I think, I think it was just conda's view of numpy package not consistent with TensorFlow's.. updating numpy through conda, fixed that. |
I have the same problem. I am using Ubuntu 15.10 with NumPy 1.11 and has no iead why TensorFlow cannot find my numpy. |
@vodp do you have an anaconda distro of python ? if yes, update conda . and then update numpy through anacoda. $conda update numpy |
No I am not using Anaconda. In Ubuntu I just built numpy from source. |
After removing the numpy compiled from source with linkage customization to openblas, re-install numpy from Ubuntu distro
|
I'm guessing the error message will include something about not finding the generated output in .runfiles/tf_serving/tensorflow_serving/... in which case the problem could be fixed in one of two ways:
|
Actually I just install the latest Bazel
|
I had a similar problem in ubuntu. The reason was that I had two different numpy installations (one using apt-get and one using pip). For any strange reason tensorflow was using the installation that was installled using apt-get instead of the one using pip (by default when I do import numpy, python uses the one installed with pip). I solved it unistalling the apt-get version: apt-get remove python-numpy |
My Numpy version is 1.10.4 py27_1... and I have successfully build Tensorflow from source with CUDA 7.5 and tested it...
However when building Tensorflow_serving by ...
$ bazel build --local_resources 3072,0.5,1.0 tensorflow_serving/...
I get the error : (last traceback included only)
ERROR: /home/irtza/serving/tensorflow_serving/session_bundle/example/BUILD:34:1: Executing genrule //tensorflow_serving/session_bundle/example:half_plus_two failed: bash failed: error executing command /bin/bash -c ... (remaining 1 argument(s) skipped).
RuntimeError: module compiled against API version a but this version of numpy is 9
Traceback (most recent call last):
====skipping to last =======
File "/home/irtza/.cache/bazel/_bazel_irtza/307be6be5aced7ceb1786e9bf1c7f317/serving/bazel-out/host/bin/tensorflow_serving/session_bundle/example/export_half_plus_two.runfiles/external/tf/tensorflow/python/pywrap_tensorflow.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow', fp, pathname, description)
ImportError: numpy.core.multiarray failed to import
When I check numpy import from python shell I can import numpy.core.multiarray ..
following is the output of testing tensorflow_serving which also Failed.
$ bazel test tensorflow_serving/...
INFO: Waiting for response from Bazel server (pid 2482)...
ERROR: package contains errors: tensorflow/bazel-tensorflow/third_party/gpus/cuda.
ERROR: error loading package 'tensorflow/bazel-tensorflow/third_party/gpus/cuda': Extension file not found. Unable to load package for '//tensorflow:tensorflow.bzl': BUILD file not found on package path.
INFO: Elapsed time: 5.636s
ERROR: Couldn't start the build. Unable to run tests.
@kirilg Can you please help me understand the problem?
Any help by anyone would be greatly appreciated.
The text was updated successfully, but these errors were encountered: