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

illegal hardware instruction with python 3.12.4 and polars 1.1.0 on MacOS Sanoma 14, M2 #17687

Open
2 tasks done
hsn-ylmz opened this issue Jul 17, 2024 · 4 comments
Open
2 tasks done
Labels
bug Something isn't working needs triage Awaiting prioritization by a maintainer python Related to Python Polars

Comments

@hsn-ylmz
Copy link

Checks

  • I have checked that this issue has not already been reported.
  • I have confirmed this bug exists on the latest version of Polars.

Reproducible example

conda create -n polars -c conda-forge polars
conda activate polars
import polars

Log output

illegal hardware instruction python

Issue description

Conda environment list;

Name Version Build Channel

bzip2 1.0.8 hfdf4475_7 conda-forge
ca-certificates 2024.7.4 h8857fd0_0 conda-forge
libblas 3.9.0 22_osx64_openblas conda-forge
libcblas 3.9.0 22_osx64_openblas conda-forge
libcxx 18.1.8 hef8daea_0 conda-forge
libexpat 2.6.2 h73e2aa4_0 conda-forge
libffi 3.4.2 h0d85af4_5 conda-forge
libgfortran 5.0.0 13_2_0_h97931a8_3 conda-forge
libgfortran5 13.2.0 h2873a65_3 conda-forge
liblapack 3.9.0 22_osx64_openblas conda-forge
libopenblas 0.3.27 openmp_h8869122_1 conda-forge
libsqlite 3.46.0 h1b8f9f3_0 conda-forge
libzlib 1.3.1 h87427d6_1 conda-forge
llvm-openmp 18.1.8 h15ab845_0 conda-forge
ncurses 6.5 h5846eda_0 conda-forge
numpy 2.0.0 py312h8813227_0 conda-forge
openssl 3.3.1 h87427d6_2 conda-forge
packaging 24.1 pyhd8ed1ab_0 conda-forge
pip 24.0 pyhd8ed1ab_0 conda-forge
polars 1.1.0 py312h5491eb7_0 conda-forge
python 3.12.4 h37a9e06_0_cpython conda-forge
python_abi 3.12 4_cp312 conda-forge
readline 8.2 h9e318b2_1 conda-forge
setuptools 70.3.0 pyhd8ed1ab_0 conda-forge
tk 8.6.13 h1abcd95_1 conda-forge
tzdata 2024a h0c530f3_0 conda-forge
wheel 0.43.0 pyhd8ed1ab_1 conda-forge
xz 5.2.6 h775f41a_0 conda-forge

Expected behavior

Even cannot import the library itself

Installed versions

Cannot import library to get version info inside python.
@hsn-ylmz hsn-ylmz added bug Something isn't working needs triage Awaiting prioritization by a maintainer python Related to Python Polars labels Jul 17, 2024
@ritchie46
Copy link
Member

And if you install via pip?

@hsn-ylmz
Copy link
Author

I am able to import polars when I install through pip. Though still I am getting warning about probably it will crash;

''python3.12/site-packages/polars/_cpu_check.py:257: RuntimeWarning: Missing required CPU features.
The following required CPU features were not detected:
avx, fma
Continuing to use this version of Polars on this processor will likely result in a crash.
Install the polars-lts-cpu package instead of polars to run Polars with better compatibility.''

This became a problem after I updated to version 1, I was using version 0.19 of polars before and it was working well.

@orlp
Copy link
Collaborator

orlp commented Jul 17, 2024

@hsn-ylmz I would suggest reading the rest of that warning message, and I think everything will become clear:

Continuing to use this version of Polars on this processor will likely result in a crash.
Install the polars-lts-cpu package instead of polars to run Polars with better compatibility.

Hint: If you are on an Apple ARM machine (e.g. M1) this is likely due to running Python under Rosetta.
It is recommended to install a native version of Python that does not run under Rosetta x86-64 emulation.

@h-vetinari
Copy link

It could be that you're running into conda-forge/libcxx-feedstock#162

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage Awaiting prioritization by a maintainer python Related to Python Polars
Projects
None yet
Development

No branches or pull requests

4 participants