我的配置:
Ubuntu 16.04 64bit
Python 2.7.9
Caffe 1.0.0
在ipython下,我可以导入numpy并使用它,但是在执行此操作时:
mkdir build
cd build
cmake ..
我收到了错误:
- Found PythonInterp: /usr/local/bin/python2.7 (found suitable version "2.7.9", minimum required is "2.7")
-- Found PythonLibs: /usr/local/lib/libpython2.7.a (found suitable version "2.7.9", minimum required is "2.7")
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named numpy
-- Could NOT find NumPy (missing: NUMPY_INCLUDE_DIR NUMPY_VERSION) (Required is at least version "1.7.1")
-- Boost version: 1.58.0
我确信只安装了一个numpy,所以有人告诉我如何解决这个问题?
答案 0 :(得分:0)
当你在Ubuntu上时,试试:
sudo apt-get install python-numpy
这应该适用于您系统的Python 2.7。
如果您正在使用virtualenv,则需要使用pip
来安装依赖项,否则上述情况应该有效。