-
I created a python package that is dependent on mrsimulator ([https://github.com/BiffoQ/relaxometrynmr])--published on PyPI. Everything works fine on my laptop and it deployed on Github as well. However, after pip installing my package in a new python environment and trying to import it, I am getting the following error, which is stemming from mrsimulator:
The code:
What do you think can be wrong? NB: if I even try:
I get the following error:
I will appreciate your support in fixing this. Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi, This seems like a numpy version issue---specifically numpy v1.x and v2.x. What is the version of numpy in your environment? From what I see from your GitHub page
you are using mrsimulator==v0.7 and numpy>1.26. Builld distribution for mrsimulator==v0.7 are for numpy<2.0 and will likely give a May I suggest using numpy<2.0 in the requirements when using mrsimulator==0.7.0. Alternativelt, you could also try using mrsimulator==1.0. It doesn't have Please let me know if you have any more questions. Happy to assist. -Deepansh |
Beta Was this translation helpful? Give feedback.
-
Thank you.
It works fine now.
Sent from Outlook for iOS<https://aka.ms/o0ukef>
…________________________________
From: Deepansh Srivastava ***@***.***>
Sent: Thursday, February 13, 2025 7:19:32 PM
To: deepanshs/mrsimulator ***@***.***>
Cc: Abdulkadir Biffo ***@***.***>; Author ***@***.***>
Subject: Re: [deepanshs/mrsimulator] ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject (Discussion #406)
Hi,
This seems like a numpy version issue---specifically numpy v1.x and v2.x. What is the version of numpy in your environment?
From what I see from your GitHub page
pip install nmrglue numpy>=1.26.0 scipy pydantic = 1.10.0 mrsimulator = 0.7.0
you are using mrsimulator==v0.7 and numpy>1.26. Builld distribution for mrsimulator==v0.7 are for numpy<2.0 and will likely give a ValueError: numpy.dtype size changed error when run in an environment with numpy>2.0
May I suggest using numpy<2.0 in the requirements when using mrsimulator==0.7.0.
Alternativelt, you could also try using mrsimulator==1.0. It doesn't have pydantic==1.10.0 and numpy<2.0 constraint.
Please let me know if you have any more questions. Happy to assist.
-Deepansh
—
Reply to this email directly, view it on GitHub<#406 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/A6PVT3DAZUH6X6D7FRNOZGD2PTO3JAVCNFSM6AAAAABXCW4D56VHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTEMJZGEZTQNY>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
Hi,
This seems like a numpy version issue---specifically numpy v1.x and v2.x. What is the version of numpy in your environment?
From what I see from your GitHub page
pip install nmrglue numpy>=1.26.0 scipy pydantic = 1.10.0 mrsimulator = 0.7.0
you are using mrsimulator==v0.7 and numpy>1.26. Builld distribution for mrsimulator==v0.7 are for numpy<2.0 and will likely give a
ValueError: numpy.dtype size changed
error when run in an environment with numpy>2.0May I suggest using numpy<2.0 in the requirements when using mrsimulator==0.7.0.
Alternativelt, you could also try using mrsimulator==1.0. It doesn't have
pydantic==1.10.0
andnumpy<2.0
constraint.Please let me know if you have any more…