Comments (6)
The new pycaffe updates require numpy >= 1.7 (which was added to Ubuntu in 13.04). If upgrading numpy (or using Anaconda etc.) is not an option, I believe the following patch should work around the issue, although I don't have a build environment I can use to test it right now.
diff --git a/python/caffe/pycaffe.cpp b/python/caffe/pycaffe.cpp
index 2bfae9e..59424ce 100644
--- a/python/caffe/pycaffe.cpp
+++ b/python/caffe/pycaffe.cpp
@@ -13,6 +13,7 @@
// Temporary solution for numpy < 1.7 versions: old macro.
#ifndef NPY_ARRAY_C_CONTIGUOUS
#define NPY_ARRAY_C_CONTIGUOUS NPY_C_CONTIGUOUS
+#define PyArray_SetBaseObject(arr, x) (PyArray_BASE(arr) = (x))
#endif
from caffe.
thanks man 👍
from caffe.
Sorry for making a dupe (#50)...haven't done much github and didn't see the full list of issues.
It turned out that my numpy version was pre 1.7 so I upgraded to 1.8.0 and did a clean build and tried 'make pycaffe' again but got the exact same errors.
from caffe.
Are you sure it isn't still including the header files of an older, less than 1.7, version of numpy? Please check your Makefile.config to see that the numpy 1.8.0 headers are included.
A common case is accidentally including an older, system, numpy over a recent, local, numpy (such as anaconda).
from caffe.
@longjon Thanks
from caffe.
@middlecode I think the main problem you might have is because you install numpy through "sudo apt-get install python-numpy" rather than through "sudo pip install numpy". Notice that if you do both, you would probably get the same errors. So make sure you run "sudo apt-get remove python-numpy" and also you run "sudo pip install numpy" as the readme suggested.
BTW, anyone has a suggestions on the alternative for apt-get? It seems apt-get is bad and it always get the outofdate libraries. Although this question is out of interest. :)
from caffe.
Related Issues (20)
- MSBuild Error
- DeleteMe
- Glib 3.4.30 not found HOT 1
- Error MSB6006: "cmd.exe" exited with code -1073741 515 HOT 2
- blob.hpp dimension check code problem
- Is it possible to use OpenCL on FreeBSD without using ROCm?
- How to build Caffe(OpenCL) on Linux from source code? HOT 1
- Caffe(OpenCL) Error: ordered comparison between pointer and zero ('int32_t *' (aka 'int *') and 'int') HOT 1
- Failed inference with nyud-fcn32s-hha
- ю
- caffe installation HOT 1
- Assessment of the difficulty in porting CPU architecture for caffe
- How to add new layer to caffe like HardSigmoid or Resize HOT 1
- module 'caffe' has no attribute 'set_mode_cpu'
- `GLOG_LIBRARYRARY_DIRS` appears to be in error HOT 1
- Could not find url for MSVC version = 1939 and Python version =
- Compiling on mac OS CPU mode only HOT 2
- Could not find url for MSVC version = 1900 and Python version = 3.10.
- forward_cpu_gemm() has bug ???
- Docker - Build Error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from caffe.