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

Module does not support numpy 2.x #32

Open
Kingaldubikhi opened this issue Dec 13, 2024 · 2 comments
Open

Module does not support numpy 2.x #32

Kingaldubikhi opened this issue Dec 13, 2024 · 2 comments

Comments

@Kingaldubikhi
Copy link

As the title suggests, there is no current support for Numpy 2.x as ISLP's modules were compiled in Numpy 1.x.

Here are two tracebacks I get when I try to import ISLP while having Numpy 2.2.0 installed:

AttributeError: _ARRAY_API not found

ImportError: numpy.core.multiarray failed to import

Downgrading to Numpy 1.26.4 fixes the issue.

@jonathan-taylor
Copy link
Collaborator

Can you give me your pip freeze? ISLP doesn't enforce numpy<=2. Did you install numpy2.2.0 after ISLP?

@Kingaldubikhi
Copy link
Author

I did install Numpy 2.2.0 after ISLP. I also made sure that all dependencies were upgraded after upgrading Numpy by using pip-review.

Running pip install --upgrade ISLP automatically uninstalls Numpy 2.2.0 and installs Numpy 1.26.4 instead.

Running pip freeze with the original issue:

absl-py==2.1.0
aiohappyeyeballs==2.4.4
aiohttp==3.11.10
aiosignal==1.3.1
asttokens==3.0.0
astunparse==1.6.3
attrs==24.2.0
autograd==1.7.0
autograd-gamma==0.5.0
certifi==2024.8.30
charset-normalizer==3.4.0
cloudpickle==3.1.0
colorama==0.4.6
comm==0.2.2
contourpy==1.3.1
cycler==0.12.1
debugpy==1.8.9
decorator==5.1.1
et_xmlfile==2.0.0
executing==2.1.0
fastjsonschema==2.21.1
filelock==3.16.1
flatbuffers==24.3.25
fonttools==4.55.3
formulaic==1.0.2
frozenlist==1.5.0
fsspec==2024.10.0
future==1.0.0
gast==0.6.0
google-pasta==0.2.0
greenlet==3.1.1
grpcio==1.68.1
h5py==3.12.1
hyperopt==0.2.7
idna==3.10
imbalanced-learn==0.12.4
interface-meta==1.3.0
ipykernel==6.29.5
ipython==8.30.0
ISLP==0.4.0
jedi==0.19.2
Jinja2==3.1.4
joblib==1.4.2
jsonschema==4.23.0
jsonschema-specifications==2024.10.1
jupyter_client==8.6.3
jupyter_core==5.7.2
keras==3.7.0
kiwisolver==1.4.7
l0bnb==1.0.0
lasio==0.31
libclang==18.1.1
lifelines==0.30.0
lightning==2.4.0
lightning-utilities==0.11.9
llvmlite==0.43.0
lxml==5.3.0
Markdown==3.7
markdown-it-py==3.0.0
MarkupSafe==3.0.2
matplotlib==3.9.3
matplotlib-inline==0.1.7
mdurl==0.1.2
ml_dtypes==0.5.0
mlxtend==0.23.3
mpmath==1.3.0
multidict==6.1.0
namex==0.0.8
nbformat==5.10.4
nest-asyncio==1.6.0
networkx==3.4.2
numba==0.60.0
numpy==2.2.1
openpyxl==3.1.5
opt_einsum==3.4.0
optree==0.13.1
packaging==24.2
pandas==2.2.3
parso==0.8.4
patsy==1.0.1
pillow==11.0.0
pip-review==1.3.0
platformdirs==4.3.6
plotly==5.24.1
progressbar2==4.5.0
prompt_toolkit==3.0.48
propcache==0.2.1
protobuf==5.29.1
psutil==6.1.0
pure_eval==0.2.3
py4j==0.10.9.7
pygam==0.9.1
Pygments==2.18.0
pyparsing==3.2.0
python-dateutil==2.9.0.post0
python-utils==3.9.1
pytorch-lightning==2.4.0
pytz==2024.2
pywin32==308
PyYAML==6.0.2
pyzmq==26.2.0
referencing==0.35.1
requests==2.32.3
rich==13.9.4
rpds-py==0.22.3
scikit-learn==1.6.0
scikit-plot==0.3.7
scipy==1.11.4
seaborn==0.13.2
six==1.17.0
smote==0.1
SQLAlchemy==2.0.36
stack-data==0.6.3
statsmodels==0.14.4
sympy==1.13.1
tenacity==9.0.0
tensorboard==2.18.0
tensorboard-data-server==0.7.2
tensorflow-io-gcs-filesystem==0.31.0
tensorflow_intel==2.18.0
termcolor==2.5.0
threadpoolctl==3.5.0
torch==2.5.1
torchaudio==2.5.1
torchinfo==1.8.0
torchmetrics==1.6.0
torchvision==0.20.1
tornado==6.4.2
tqdm==4.67.1
traitlets==5.14.3
typing_extensions==4.12.2
tzdata==2024.2
urllib3==2.2.3
wcwidth==0.2.13
Werkzeug==3.1.3
wrapt==1.17.0
xgboost==2.1.3
yarl==1.18.3

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

No branches or pull requests

2 participants