[Numpy-discussion] Impossibility to build nipy on recent numpy?

Robert Kern robert.kern@gmail....
Wed Dec 9 15:52:19 CST 2009

On Wed, Dec 9, 2009 at 15:40, Gael Varoquaux
<gael.varoquaux@normalesup.org> wrote:
> On Wed, Dec 09, 2009 at 04:36:54PM -0500, Matthew Brett wrote:
>> > "/home/varoquau/dev/nipy-trunk/nipy/neurospin/register/iconic_matcher.py",
>> > line 6, in <module>
>> >    from routines import _joint_histogram, _similarity,
>> > similarity_measures
>> >  File "numpy.pxi", line 74, in nipy.neurospin.register.routines
>> > (nipy/neurospin/register/routines.c:6042)
>> > ValueError: numpy.dtype does not appear to be the correct type object
>> Er - I've had this error in the past, but as far as I remember it is
>> always because I am somehow picking up a fragment of the wrong numpy
>> C-API.  Usual steps (delete site-packages/numpy maybe
>> site-packages/scipy, <numpy_svn>/build <scipy_svn>/build, rebuild and
>> install, then remove site-packages/nipy <nipy-dev>/build if necessary,
>> or all traces of inplace build, then try again?
> I did that quite a few times. Maybe I am forgetting to clean up
> something. I do the following for numpy/scipy/nipy (using zsh extended
> glob):
> rm -rf build **/*.o **/*.so **/*.a
> python setup.py build_ext --inplace

If you are building numpy inplace, you will also have to delete the
inplace headers.

        rm -rf build
        rm -f numpy/core/include/numpy/__multiarray_api.c
numpy/core/include/numpy/__ufunc_api.h numpy/core/include/numpy
        rm -f `find . -name "*.so"`

Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
  -- Umberto Eco

More information about the NumPy-Discussion mailing list