Description
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
withwetterdienst==0.97.0
results inpolars
being correctly set to version 0.20.25. - However, installing
polars-lts-cpu==0.20.25
withwetterdienst==0.97.0
results in bothpolars==1.20.0
andpolars-lts-cpu==0.20.25
being installed, which causes conflicts. To resolve this, we have to manually uninstallpolars
.
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 eitherpolars
orpolars-lts-cpu
is already installed. If one of these packages is detected, it would skip the automatic installation ofpolars
.
We believe this change would make your package more flexible for users with different compatibility needs. Thank you for your time and consideration!