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

Cannot install nnmnkwii because of cythonizing error #126

Closed
taroushirani opened this issue Jun 20, 2024 · 12 comments · Fixed by #127
Closed

Cannot install nnmnkwii because of cythonizing error #126

taroushirani opened this issue Jun 20, 2024 · 12 comments · Fixed by #127

Comments

@taroushirani
Copy link
Sponsor Contributor

I failed to install nnmnkwii which is the HEAD version of master branch because cnp.int_t in nnmnkwii/paramgan/_bandmat/misc.pyx is invalid type when cythonizing. I'm afraid that it came from the API incompatibility between numpy 2.0.0 and that of older versions.

environment: Debian 12.5(WSL2)
python version: 3.11.2
numpy version: 2.0.0
cython version: 3.0.10

nnmnkwii_install.log

@amenomori
Copy link

Same problem here. A little refactor may help this.

@haruki-N
Copy link

While preparing the environment for REMDIS, I got the same error.

environment: M2 mac
python: 3.11.9
The versions of the packages follow the requirements.txt of REMDIS.
(numpy: 1.26.4, cython: 3.0.8)

@r9y9
Copy link
Owner

r9y9 commented Jun 25, 2024

shouldn't be that hard to fix cython code for numpy 2.0.0, but the easiest fix is to use numpy <2.0.0 for now

@phypan11
Copy link

phypan11 commented Jun 25, 2024

I tried to lower numpy/scipy/cython versions. Even python version. All failed..I don't know why.
I tried numpy 1.20-1.25, scipy 1.10-1.12, cython 0.29-3.0
python 3.9-3.12
All failed.

Cython.Compiler.Errors.CompileError: nnmnkwii/paramgen/_bandmat/misc.pyx

def fancy_plus_equals(cnp.ndarray[cnp.int_t, ndim=1] target_index_seq,
^
------------------------------------------------------------

  nnmnkwii/paramgen/_bandmat/misc.pyx:16:38: Invalid type.

@personabb
Copy link

personabb commented Jun 25, 2024

I was able to install it using the link below.
https://github.com/decfrr/nnmnkwii/tree/decfrr/fix-numpy-version

git clone -b decfrr/fix-numpy-version https://github.com/decfrr/nnmnkwii.git
cd nnmnkwii
pip install -e .

Thank you, @decfrr.

@phypan11
Copy link

Above worked for me too. Thank you, @decfrr @personabb

@r9y9 r9y9 closed this as completed in #127 Jun 26, 2024
@r9y9 r9y9 reopened this Jun 26, 2024
@r9y9
Copy link
Owner

r9y9 commented Jun 26, 2024

I'll keep this issue open until I make a new release.

@francampillo
Copy link

Do you have some estimation of when you might make the new release including this change?
Thank you very much in advance...

@r9y9
Copy link
Owner

r9y9 commented Jun 28, 2024

I'll work on it this weekend

@francampillo
Copy link

@r9y9 Thank you very much! :))

@r9y9
Copy link
Owner

r9y9 commented Jun 29, 2024

fixed by https://github.com/r9y9/nnmnkwii/releases/tag/v0.1.3

let me know if the problem persists

@r9y9 r9y9 closed this as completed Jun 29, 2024
@francampillo
Copy link

@r9y9 All working now. Thank you very much!

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

Successfully merging a pull request may close this issue.

7 participants