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

numpy.ufunc size changed, may indicate binary incompatibility. Expected 216 from C header, got 192 from PyObject. #3655

Closed
simonm3 opened this issue Jan 17, 2019 · 16 comments

Comments

@simonm3
Copy link

@simonm3 simonm3 commented Jan 17, 2019

Help! I am installing from source because I need a bug fix for houghlines that is not in the latest release.

I get the message "Expected 216 from C header, got 192 from PyObject."

Possibly it is a numpy incompatibility. However I was also getting the reverse message "Expected 192 but got 216" for bcolz until I moved it to later in the install.

How can I install bcolz, numpy, pytorch, skimage at the same time?

@stefanv

This comment has been minimized.

Copy link
Member

@stefanv stefanv commented Jan 17, 2019

The new NumPy release is tripping a lot of people up. Please downgrade your NumPy to a previous version, or use conda-forge for now. We are planning a new release for later today. See also #3649

@stefanv stefanv closed this Jan 17, 2019
@simonm3

This comment has been minimized.

Copy link
Author

@simonm3 simonm3 commented Jan 18, 2019

New release of skimage fixed it thanks. Not sure of cause but was not using latest release of numpy.

@hmaarrfk

This comment has been minimized.

Copy link
Member

@hmaarrfk hmaarrfk commented Jan 18, 2019

Interesting. Maybe you can tell us more about how you installed numpy, scikit-image, and pytorch if it happens again.

Things like OS, python version, pip vs conda are important.

@simonm3

This comment has been minimized.

Copy link
Author

@simonm3 simonm3 commented Jan 18, 2019

@hmaarrfk

This comment has been minimized.

Copy link
Member

@hmaarrfk hmaarrfk commented Jan 18, 2019

is there a particular reason why you are compiling skimage from source?
do the packages on conda not work?
are you using conda-forge???

the issue is likely (though not 100% sure) that you are likely compiling skimage with a newer version of numpy than pytorch was compiled with

@hmaarrfk

This comment has been minimized.

Copy link
Member

@hmaarrfk hmaarrfk commented Jan 18, 2019

oh yeah, also, don't install one package with pip, the other with conda. that is a recipe for disaster.

@hmaarrfk

This comment has been minimized.

Copy link
Member

@hmaarrfk hmaarrfk commented Jan 18, 2019

mostly, you really shouldn't install numpy via pip. if a package exists on conda, you should use that. if it doesn't you can probably request it to be on conda-forge
https://github.com/conda-forge/staged-recipes

@simonm3

This comment has been minimized.

Copy link
Author

@simonm3 simonm3 commented Jan 18, 2019

@hmaarrfk

This comment has been minimized.

Copy link
Member

@hmaarrfk hmaarrfk commented Jan 18, 2019

oh man, it was a bug in the pyx file, so you couldn't have just fixed it yourself. Yeah.....

there was some discussion about having more frequent releases. unfortunately, it doesn't seem to have gone anywhere, likely due to lack of bandwidth.

I think it is reasonable to try and find that issue, or to open a new one asking for more releases. Explaining your story (wanting to install pytorch and scikit-image) is likely good enough.

pytorch now exists on pip no?

https://pytorch.org/

@stefanv

This comment has been minimized.

Copy link
Member

@stefanv stefanv commented Jan 18, 2019

mostly, you really shouldn't install numpy via pip. if a package exists on conda, you should use that. if it doesn't you can probably request it to be on conda-forge
https://github.com/conda-forge/staged-recipes

Many of us use pip exclusively, actually; so, use whatever the default installer of your environment is. Try to stick to "all conda" or "all pip".

@hmaarrfk

This comment has been minimized.

Copy link
Member

@hmaarrfk hmaarrfk commented Jan 18, 2019

Many of us use pip exclusively, actually; so, use whatever the default installer of your environment is. Try to stick to "all conda" or "all pip".

Consistency is more what I was looking for. Thanks for making that clear @stefanv

@simonm3

This comment has been minimized.

Copy link
Author

@simonm3 simonm3 commented Jan 18, 2019

@hmaarrfk

This comment has been minimized.

Copy link
Member

@hmaarrfk hmaarrfk commented Jan 18, 2019

it might be because you have something like a dependency that only exists on python2.7. for example, enum34 is one of these.

conda knows that it is being slow these days. they are trying to fix it.....

@odbarragan

This comment has been minimized.

Copy link

@odbarragan odbarragan commented Apr 18, 2019

As of now, I tried rolling back numpy to 1.14.5 and all other versions but none worked but upgrading to 1.16.1 finally fixed it!.

pip install numpy==1.16.1

@patsotoe

This comment has been minimized.

Copy link

@patsotoe patsotoe commented May 13, 2019

this works.

@yustiks

This comment has been minimized.

Copy link

@yustiks yustiks commented May 24, 2019

As of now, I tried rolling back numpy to 1.14.5 and all other versions but none worked but upgrading to 1.16.1 finally fixed it!.

pip install numpy==1.16.1

thank You! it helped

@scikit-image scikit-image locked as too heated and limited conversation to collaborators May 24, 2019
@scikit-image scikit-image unlocked this conversation May 24, 2019
lkluft added a commit to lkluft/konrad that referenced this issue Jul 30, 2019
NumPy changed the ``numpy.ufunc`` size which could lead to
inconsistencies with other (compiled) packages. The issue is supposed to
be fixed vor version >1.16.1

scikit-image/scikit-image#3655 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.