-
Notifications
You must be signed in to change notification settings - Fork 262
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
🐛[BUG]: Install from source fails on Python 3.12 due to NumPy pin #723
Comments
@ktangsali (or @NickGeneva) do you remember why you originally updated the numpy dependency from Some context that may be helpful is that numpy released version |
I also ran into this issue the other day here with modulus blocking python 3.12 installs NVIDIA/earth2studio#150 I suspect we were encountering an issues with one of the other dependencies and numpy 1.26.0 so locked it at the time, I do not recall precise details however. I'd recommend we remove the upper bound this seems to operate fine now. |
At the time |
Update on this: I removed the NumPy pin and am testing the install process on Py3.12. In the meantime, I'm documenting one other (minor) issue here for visibility, which may be helpful for end-users installing Modulus on Python 3.12: One of Modulus' dependencies, So, for end-users, you can install Modulus with:
Or, for dev installs (cloned locally), one might do:
|
Started this PR to address the issue. |
I have followed the above steps, but why am I still getting the following error: 'Preparing metadata (pyproject.toml) did not run successfully.' |
Version
0.9.0a0
On which installation method(s) does this occur?
Source
Describe the issue
Overview
Modulus installation from source fails on Python 3.12 during installation of its NumPy dependency. I confirm that Modulus install does work correctly on Python 3.11, which suggests that this issue is 3.12-specific.
The root cause is pretty straightforward: Modulus pins
numpy>=1.22.4,<1.25
inpyproject.toml
, which causes NumPy 1.24.4 to be installed. NumPy 1.24 only supports Python 3.8-3.11, as it depends onpkgutil.ImpImporter
, which was removed in Python 3.12 following its deprecation.This issue is low-priority, but important to track. Given that the default public Anaconda/Miniconda is now Python 3.12, this will start impacting more users.
Related issue: #383 [FEA]: Support for newer numpy
Steps to reproduce
https://github.com/NVIDIA/modulus/
pip install .
Suggested fix
A few options:
Full Traceback
The text was updated successfully, but these errors were encountered: