Skip to content
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

make pycaffe error #50

Closed
simmers opened this issue Jan 23, 2014 · 9 comments
Closed

make pycaffe error #50

simmers opened this issue Jan 23, 2014 · 9 comments

Comments

@simmers
Copy link

simmers commented Jan 23, 2014

on the boost-eigen branch.
I was able to make and make runtest and all was good. (ubuntu12.04, gtx580)

But when I ran "make pycaffe"(in the same dir), I got the following errors...

python/caffe/pycaffe.cpp: In member function ‘boost::python::api::object CaffeBlobWrap::get_data()’:
python/caffe/pycaffe.cpp:72:74: error: ‘PyArray_SetBaseObject’ was not declared in this scope
python/caffe/pycaffe.cpp: In member function ‘boost::python::api::object CaffeBlobWrap::get_diff()’:
python/caffe/pycaffe.cpp:85:74: error: ‘PyArray_SetBaseObject’ was not declared in this scope
make: *** [py] Error 1

any ideas?

THANKS!! for making this available by the way.

@longjon
Copy link
Contributor

longjon commented Jan 23, 2014

See #44.

@shelhamer
Copy link
Member

@longjon I included this patch at https://github.com/shelhamer/caffe/commits/numpy-lessthan-1-7 and tested with numpy-1.6. It builds, and import caffe works, but there is an instant segfault on from caffe import imagenet.

I tested by swapping out numpy versions in conda: conda install numpy=1.6 to test then conda install numpy=1.7 to revert.

@amiltonwong
Copy link

Hi, Evan Shelhamer,
I had succeeded in "make pycaffe" without modifying the code "pycaffe.cpp", and my machine's numpy version is 1.8.0. Now , I had issues the same as which you described:
"import caffe" works, but "from caffe import imagenet" failed, the message is as follows:

import caffe
from caffe import imagenet
Traceback (most recent call last):
File "", line 1, in
File "/root/caffe-master/python/caffe/imagenet/init.py", line 1, in
from .wrapper import *
File "/root/caffe-master/python/caffe/imagenet/wrapper.py", line 7, in
from skimage import io
ImportError: No module named skimage

P.S. : I had succeeded in compilation for caffe 'make all' and everything is ok (My system is Ubuntu 12.04)

Could you suggest me how to fix it?

Best regards,
Milton

@Yangqing
Copy link
Member

Yangqing commented Feb 2, 2014

Install scikit-image should solve the problem. If you have pip (strongly
recommended), it is as simple as:

pip install scikit-image

Yangqing

On Sat, Feb 1, 2014 at 9:11 PM, amiltonwong notifications@github.comwrote:

Hi, Evan Shelhamer,
I had succeeded in "make pycaffe" without modifying the code
"pycaffe.cpp", and my machine's numpy version is 1.8.0. Now , I had issues
the same as which you described:
"import caffe" works, but "from caffe import imagenet" failed, the message
is as follows:

import caffe
from caffe import imagenet
Traceback (most recent call last):
File "", line 1, in
File "/root/caffe-master/python/caffe/imagenet/init.py", line 1, in
from .wrapper import *
File "/root/caffe-master/python/caffe/imagenet/wrapper.py", line 7, in
from skimage import io
ImportError: No module named skimage

P.S. : I had succeeded in compilation for caffe 'make all' and everything
is ok (My system is Ubuntu 12.04)

Could you suggest me how to fix it?

Best regards,
Milton

Reply to this email directly or view it on GitHubhttps://github.com//issues/50#issuecomment-33892612
.

@amiltonwong
Copy link

Thanks Yangqing,
I had fixed it.
After installing cython , and then scikit-image.

Best regards,
Milton

@Yangqing
Copy link
Member

I assume this is already solved? Please kindly reopen if problem persists.

@ZhilunX
Copy link

ZhilunX commented Feb 16, 2014

I faced a similar problem now. I have installed numpy 1.8 and the old version is work for me. But when I update the caffe project today ( it adds sigmoid layer) and remake this project. it throws the same problems, any solutions? Thanks

@evolu8
Copy link

evolu8 commented Apr 12, 2015

Would be great for this to make its way into the recommended install procedure documents.

@sealfoss
Copy link

sealfoss commented Jul 8, 2015

It is, sorta. They recommend using Anaconda. Do that.

peerajak pushed a commit to peerajak/caffe that referenced this issue Dec 2, 2015
Fix gradient accumulation for cuDNN convolution layer
Cysu pushed a commit to Cysu/caffe that referenced this issue May 20, 2016
naibaf7 added a commit that referenced this issue Feb 2, 2017
add android cmake support over the BVLC/caffe opencl (issue #48)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants