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

ValueError: numpy.ndarray size changed, may indicate binary incompatibility #28

Open
huangchann opened this issue Sep 6, 2022 · 4 comments

Comments

@huangchann
Copy link

Hello, I install the pylandau throug pip3 install pylandau, in Ubuntu20.04 with python3.8 ,the install is normal, but when I import pylandau in Python3,it give the error,
`Python 3.8.10 (default, Jun 2 2021, 10:49:15)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

import pylandau
Traceback (most recent call last):
File "", line 1, in
File "pyLandau/cpp/pylandau.pyx", line 1, in init pylandau
ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject`
My gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04), How I can fix this?

@davbac
Copy link

davbac commented Sep 20, 2022

Got same error message running on py 3.10.6, GCC 11.3.0, ubuntu 22.04

@cbespin
Copy link
Collaborator

cbespin commented Jan 23, 2023

Thanks for reporting this and sorry for the late reply. I observed similar issues that should be resolved with the latest release.

What numpy version are you using? Can you try to install it within a virtual environment created from scratch?

@IrisP25
Copy link

IrisP25 commented Nov 20, 2023

I keep getting the same error. Could it be possible to upgrade the package so it's compatible with numpy-1.26.2?

@cbespin
Copy link
Collaborator

cbespin commented Nov 20, 2023

@IrisP25 The current version works well for me with numpy 1.26.2 (see environment below). Can you provide me with more information about your python environment? And try the package in a fresh environment as well?

Python 3.10.12

Package    Version
---------- -------
Cython     3.0.5
numpy      1.26.2
pip        23.0.1
pylandau   2.2.1
scipy      1.11.4
setuptools 65.5.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants