Open deyanmihaylov opened 1 month ago
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". Log: https://app.travis-ci.com/github/CobayaSampler/cobaya/builds/271808045
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.
pip cache purge
pip download --no-deps classy
tar -zxvf classy-3.2.3.2.tar.gz
cd classy-3.2.3.2/
sed -i 's/np\.int_t/np.int64_t/g' class_public/python/classy.pyx
pip install .
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.
When I try to install
classy
usingpip install classy
I get the following error