unionai-oss / pandera

A light-weight, flexible, and expressive statistical data testing library

Home Page:https://www.union.ai/pandera

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error Importing Pandera with Polars extra

baldwinj30 opened this issue · comments

Describe the bug
I get an error when importing pandera after installing the latest 0.19.0b2 version with the polars extra in a clean environment. I can import it successfully if I install without the polars extra.

  • I have checked that this issue has not already been reported.
  • I have confirmed this bug exists on the latest version of pandera.
  • (optional) I have confirmed this bug exists on the main branch of pandera.

Code Sample, a copy-pastable example

I installed pandera 0.19.0b2 in a clean virtual environment using pip install pandera[polars]==0.19.0b2 and attempted to import pandera:

import pandera as pa

I got the following error message:

>>> import pandera as pa
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File ".venv/lib/python3.11/site-packages/pandera/__init__.py", line 6, in <module>
    from pandera import errors, external_config, typing
  File ".venv/lib/python3.11/site-packages/pandera/external_config.py", line 23, in <module>
    import pyspark.pandas
ModuleNotFoundError: No module named 'pyspark'

Versions:

  • Pandera: 0.19.0b2
  • Python: 3.11.7
  • Ubuntu: 22.04

Good catch! #1591 should fix this

Will cut a fresh beta release so you can continue testing :)