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

[FEA] Latest cudf breaks latest pandas #8992

Closed
mirekphd opened this issue Aug 7, 2021 · 2 comments
Closed

[FEA] Latest cudf breaks latest pandas #8992

mirekphd opened this issue Aug 7, 2021 · 2 comments
Labels
feature request New feature or request

Comments

@mirekphd
Copy link

mirekphd commented Aug 7, 2021

Describe the bug
Latest binary Anaconda release of cudf is incompatible with the latest PyPi release of pandas, causing reproducible import failure in the latter in various systems. This bug has been reproduced and analyzed here: pandas-dev/pandas#42506

Steps/Code to reproduce bug
Run this docker container with the clashing versions of both packages installed and try to import pandas:

$ docker run mirekphd/ml-gpu-py38-cuda112-cust:20210806 python -c "import pandas as pd; print(pd.__version__)"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/opt/conda/lib/python3.8/site-packages/pandas/__init__.py", line 144, in <module>
    from pandas.io.api import (
  File "/opt/conda/lib/python3.8/site-packages/pandas/io/api.py", line 8, in <module>
    from pandas.io.excel import ExcelFile, ExcelWriter, read_excel
  File "/opt/conda/lib/python3.8/site-packages/pandas/io/excel/__init__.py", line 1, in <module>
    from pandas.io.excel._base import ExcelFile, ExcelWriter, read_excel
  File "/opt/conda/lib/python3.8/site-packages/pandas/io/excel/_base.py", line 33, in <module>
    from pandas.io.parsers import TextParser
  File "/opt/conda/lib/python3.8/site-packages/pandas/io/parsers/__init__.py", line 1, in <module>
    from pandas.io.parsers.readers import (
  File "/opt/conda/lib/python3.8/site-packages/pandas/io/parsers/readers.py", line 17, in <module>
    from pandas._typing import (
ImportError: cannot import name 'DtypeArg' from 'pandas._typing' (/opt/conda/lib/python3.8/site-packages/pandas/_typing.py)

Expected behavior
Pandas import should succeed, pandas version 1.3.1 should be printed out.

Environment overview (please complete the following information)

  • Environment location: [Docker]
  • Method of cuDF install: [conda]:
$pip install cython cupy-cuda112 
$conda install -c rapidsai -c nvidia -c conda-forge blazingsql cudf python=$PYTHON_VERSION cudatoolkit

Environment details
Please run and paste the output of the cudf/print_env.sh script here, to gather any other relevant environment details
Warning: the script was not bundled with this version of cudf.

Additional context
The current workarounds are uninstalling cudf or downgrading pandas to the latest version compatible with cudf requirements (pandas==1.2.5), both of which restore pandas ability to be imported,
More info at:
pandas-dev/pandas#42506

@mirekphd mirekphd added Needs Triage Need team to review and classify bug Something isn't working labels Aug 7, 2021
@beckernick
Copy link
Member

beckernick commented Aug 7, 2021

Hi @mirekphd . When multiple libraries have a high pace of development, the combined set of changes and dependencies can lead to unexpected breakages, exactly as you've noticed. As a result, cuDF currently pins pandas versions to pandas >=1.0,<1.3.0dev0.

We'll evaluate updating our pandas version requirements. In the meantime, you should be fine if you install pandas from conda-forge, as conda's SAT solver will identify the requirement from cuDF and install an appropriate version.

I'm going to close this issue as answered. Please let us know if the suggestion above doesn't work for you, and feel free to reopen the issue.

EDIT: I'm going to leave open this issue and tag it as a feature request to update our pandas requirement.

@beckernick beckernick reopened this Aug 7, 2021
@beckernick beckernick added conda and removed bug Something isn't working Needs Triage Need team to review and classify labels Aug 7, 2021
@beckernick beckernick added pandas feature request New feature or request labels Aug 7, 2021
@beckernick beckernick changed the title [BUG] Latest cudf breaks latest pandas [FEA] Latest cudf breaks latest pandas Aug 23, 2021
@beckernick
Copy link
Member

Now covered by #9125

@vyasr vyasr removed the pandas label May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants