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

Pip install of omamer does not lead to executable omamer #34

Closed
KatharinaHoff opened this issue Jun 28, 2024 · 7 comments
Closed

Pip install of omamer does not lead to executable omamer #34

KatharinaHoff opened this issue Jun 28, 2024 · 7 comments

Comments

@KatharinaHoff
Copy link

Dear developers,
I am trying to install omamer via pip in a Docker container with a python 3.10.9. I run

pip install omamer

The binary ends up in /opt/conda/bin/omamer, but it is not executable with the following error message:

Traceback (most recent call last):
  File "/opt/conda/bin/omamer", line 8, in <module>
    sys.exit(main())
  File "/opt/conda/lib/python3.10/site-packages/omamer/main.py", line 33, in main
    from tables import PerformanceWarning
  File "/opt/conda/lib/python3.10/site-packages/tables/__init__.py", line 44, in <module>
    from .utilsextension import get_hdf5_version as _get_hdf5_version
  File "tables/utilsextension.pyx", line 1, in init tables.utilsextension
ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject

Do you have any advice on how to fix this?

@sinamajidian
Copy link

Hi, I faced similar issue and pip install numpy==1.23 solved it (it might need re-installing omamer).

@KatharinaHoff
Copy link
Author

KatharinaHoff commented Jun 28, 2024

Thank you. We tried for more than an hour today to install all of kinds of numpy versions, and also all kinds of omamer versions, but it does not solve the problem. Here's my RUN command from the dockerfile:

USER ${NB_UID}

RUN pip install numpy==1.23 & \
    pip install omamer

But the error remains the same.

sudo ./run.sh
(base) jovyan@e0f484f27955:~$ omamer
Traceback (most recent call last):
  File "/opt/conda/bin/omamer", line 8, in <module>
    sys.exit(main())
  File "/opt/conda/lib/python3.10/site-packages/omamer/main.py", line 33, in main
    from tables import PerformanceWarning
  File "/opt/conda/lib/python3.10/site-packages/tables/__init__.py", line 44, in <module>
    from .utilsextension import get_hdf5_version as _get_hdf5_version
  File "tables/utilsextension.pyx", line 1, in init tables.utilsextension
ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject

@KatharinaHoff
Copy link
Author

KatharinaHoff commented Jun 28, 2024

We have local machines with running older versions of omamer, but I went to one machine that does not have it, and did a pip install of omamer there, today, too, and the problem is the same. It's not a Docker problem, I tried on a native Ubuntu 22.04.4 LTS with Python 3.12.1

I know that 3.12.1 is known not to work! I want to point out that I have the problem regardless of 3.12.1 or an older version, i.e. 3.10.9. Error looks the same.

@alpae
Copy link
Member

alpae commented Jul 1, 2024

Hi @KatharinaHoff

it seems that numpy 1.23 is too old and will be updated during the installation of omamer again to numpy==2.0.

You should rather use the latest version before 2.0.0, which is 1.26.4.

I will make a new release of omamer that freezes numpy to a pre 2.0 version in the requirements asap.

@alpae
Copy link
Member

alpae commented Jul 1, 2024

reference: PyTables/PyTables#1172

@alpae
Copy link
Member

alpae commented Jul 1, 2024

new release 2.0.4 should fix the problem.

@KatharinaHoff
Copy link
Author

Than you very much, indeed, this fixed the problem!

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

3 participants