-
Notifications
You must be signed in to change notification settings - Fork 293
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
Installation error using python3.12 #584
Comments
Here is the entire traceback which could not be pasted in the issue: https://pastebin.com/ZFJmv4H7 |
Cobaya tests fail due to the same issue when compiling with py12 and numpy 2. I think numpy 2 removed "int_t". |
Is there any plan to provide a fix? I don't know if you can do it on your end, or cobaya maintainers have to issue a new release. |
This is a CLASS problem, nothing to do with Cobaya. For local builds you can try changing the int_t declarations yourself or you can install an earlier numpy version. |
I am having the same issue with installing classy. My Python version is 3.10.11. |
Since numpy2, the way to specify the type of np.int_t seems to have become strict. Until it is fixed on the CLASS side, you can install it by downloading and editing the file as follows.
It can install and import, but I don't know if numpy2 will cause any problems. As long as I am using it, there is no problem. |
Hi! I believe that this was fixed by the release of CLASS v3.2.4 on the 30.09.2024 (and it should still be OK with the current v3.2.5). If you still have similar problems with recent versions, you can open an issue on https://github.com/lesgourg/class_public |
Hi all I think it would be a good idea to add this to the package page as a temporary solution as more of us are facing the same issue. many thanks! |
also, this is the macOS version of the solution
|
forgot to add in case you need this info:
So, to conclude, I had the Error Installing CLASSy Due to Cython Compilation Issue on this setup. |
Dear @nikosarcevic , in your example I see that you are using class v3.2.3. I would have thought that this problem was fixed already in v3.2.4 on the 30.09.2024 (and we are now at v3.2.5 since the 4.10.2024). Can you check whether you meet this kind of numpy issues with v3.2.4 or 3.2.5? If yes we should really do something more. You can either clone the new versions, or just merge them in your class if you have done your own modifications. |
Hi, @lesgourg Let me see if I can do this quickly as I have telecons soon. |
Hi again, @lesgourg It seems that, if my understanding is correct, the issue was resolved in CLASS version 3.2.5, as pulling this version from GitHub, building it manually, and installing the Python wrapper (classy) worked for me. The NumPy compatibility issue (np.int_t) no longer occurs with this version. however, I noticed that classy version 3.2.5 is not available on PyPI. Users relying on pip install classy might still face the same problem unless they manually pull and build from GitHub. Perhaps publishing the latest version to PyPI could help prevent this confusion for others. (or adding the solutions above as a temporary fix until 3.2.5 is avail) |
Many thanks @nikosarcevic , I had not realised that 3.2.5 was not available on PyPI, we will fix this! |
@lesgourg Brilliant! Many, many thanks! |
When I try to install
classy
usingpip install classy
I get the following error
The text was updated successfully, but these errors were encountered: