8000 Compatibility with polars-lts-cpu · Issue #1367 · earthobservations/wetterdienst · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Compatibility with polars-lts-cpu #1367
Open
@KaifengXuuu

Description

@KaifengXuuu

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0