Bug Report:cannot import name 'Buffer' from 'typing_extensions' (/usr/local/lib/python3.10/dist-packages/typing_extensions.py)
abebe0210 opened this issue · comments
Current Behaviour
I get this error:
"cannot import name 'Buffer' from 'typing_extensions' (/usr/local/lib/python3.10/dist-packages/typing_extensions.py)"
when I try importing from ydata_profiling import ProfileReport on google colab.
I wondered if you could help me.
Expected Behaviour
install nomally
Data Description
Code that reproduces the bug
from ydata_profiling import ProfileReport
pandas-profiling version
v4.6.3
Dependencies
python==3.10.12
pandas==1.5.3
numpy==1.23.5
OS
google colab
Checklist
- There is not yet another bug report for this issue in the issue tracker
- The problem is reproducible from this bug report. This guide can help to craft a minimal bug report.
- The issue has not been resolved by the entries listed under Common Issues.
Same problem in Google Colab
Same problem in Notebooks on Azure Synapse spark pools. See attached notebook .ipynb dump with output included.
Notebook 1-ipynb.txt
Hello,
typing_extensions.Buffer
appears to have been added to Python 3.12.
Maybe you should try to update the package using:
!pip install -U pandas-profiling
Hello,
typing_extensions.Buffer
appears to have been added to Python 3.12.Maybe you should try to update the package using:
!pip install -U pandas-profiling
Tried - and that didn't work either. Fails with
ImportError: cannot import name 'deprecated' from 'typing_extensions' (/home/trusted-service-user/cluster-env/env/lib/python3.10/site-packages/typing_extensions.py)
Both pandas-profiling and ydata-profiling are tagged with "Requires: Python >=3.7, <3.12" so one would expect it to work on 3.11 (or tagging needs to be updated).
Same problem in Google Colab
Update: Managed to make it work.
At the top of the Colab run this:
import sys
!{sys.executable} -m pip install -U ydata-profiling[notebook]
!jupyter nbextension enable --py widgetsnbextension
Then, import it from ydata_profiling import ProfileReport
Afterwards, do whatever you want.
I just reliased that if you "pip install" or "import it" after other imports it raises this error with Buffer.
This is still an issue and its showstopper.