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

Compatibility with polars-lts-cpu #1367

Open
KaifengXuuu opened this issue Nov 18, 2024 · 0 comments
Open

Compatibility with polars-lts-cpu #1367

KaifengXuuu opened this issue Nov 18, 2024 · 0 comments

Comments

@KaifengXuuu
Copy link

Hello guys,

We got an error thrown by polars and it suggested to install polars-lts-cpu instead while using wetterdienst. Specifically, wetterdienst currently installs polars by default, which causes errors in our environment:

/usr/local/lib/python3.10/site-packages/polars/_cpu_check.py:258: RuntimeWarning:

Missing required CPU features.

The following required CPU features were not detected:
    avx2, fma, bmi1, bmi2, lzcnt, movbe
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.

If you believe this warning to be a false positive, you can set the `POLARS_SKIP_CPU_CHECK` environment variable to bypass this check.


DAMN ! worker 2 (pid: 12) died, killed by signal 4 :( trying respawn ...
Respawned uWSGI worker 2 (new pid: 62)
/usr/local/lib/python3.10/site-packages/polars/_cpu_check.py:258: RuntimeWarning:

Missing required CPU features.

The following required CPU features were not detected:
    avx2, fma, bmi1, bmi2, lzcnt, movbe
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.

If you believe this warning to be a false positive, you can set the `POLARS_SKIP_CPU_CHECK` environment variable to bypass this check.


DAMN ! worker 1 (pid: 8) died, killed by signal 4 :( trying respawn ...

The error suggests using the polars-lts-cpu package instead, which is more compatible with our system's CPU features. However, even when polars-lts-cpu is already installed, installing wetterdienst automatically installs polars, which leads to errors.

Here are the behaviors we observed:

  • Installing polars==0.20.25 with wetterdienst==0.97.0 results in polars being correctly set to version 0.20.25.
  • However, installing polars-lts-cpu==0.20.25 with wetterdienst==0.97.0 results in both polars==1.20.0 and polars-lts-cpu==0.20.25 being installed, which causes conflicts. To resolve this, we have to manually uninstall polars.

Suggested Solution

Would it be possible to adjust the package’s dependencies to support both versions? For example:

  • During the installation or initialization process, wetterdienst could check if either polars or polars-lts-cpu is already installed. If one of these packages is detected, it would skip the automatic installation of polars.

We believe this change would make your package more flexible for users with different compatibility needs. Thank you for your time and consideration!

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

1 participant