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

ModuleNotFoundError: No module named 'ydata_profiling' on Jupyter using pip #1595

Open
3 tasks done
simonespa opened this issue May 18, 2024 · 3 comments
Open
3 tasks done

Comments

@simonespa
Copy link

simonespa commented May 18, 2024

Current Behaviour

I get a ModuleNotFoundError: No module named 'ydata_profiling' error message in Jupyter notebook when I import the ydata-profiling module.

The package version is 4.8.3 and I installed it with pip.

Expected Behaviour

I would expect for the module to be found.

Code that reproduces the bug

Install the dependency using pip. Either

pip install ydata-profiling

or

pip install 'ydata-profiling[notebook]'

Then run it in a Jupyterlab environment

from ydata_profiling import ProfileReport

ydata-profiling version

v4.8.3

Dependencies

Using Python v3.11.7 and pip v24.0, with the following dependencies
- pandas==2.2.2
- notebook==7.2.0
- jupyterlab==4.2.0
- ydata-profiling==4.8.3

OS

macOS Sonoma v14.4.1 (Darwin Kernel Version 23.4.0 x86_64)

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.

Similar issue

#1530

@simonespa
Copy link
Author

simonespa commented May 18, 2024

For further info, I did ask with #1530 (comment) whether the resolution of #1530 (which is now closed) applies when using pip, given I still get the error.

Thanks for your time.

@simonespa
Copy link
Author

simonespa commented May 18, 2024

I thought that it could have been an issue with the latest version of ydata-profiling, but I tried to install all the previous major versions listed here https://pypi.org/project/ydata-profiling/#history and I get the same error.

This suggests an issue not on the latest version of the profiler per-se, but rather an issue with the other dependencies, maybe with the latest versions of Jupyter?

@simonespa
Copy link
Author

simonespa commented May 20, 2024

I'm following the documentation at https://docs.profiling.ydata.ai/latest/getting-started/installation/ and both the steps are failing.

By running !{sys.executable} -m pip install -U ydata-profiling[notebook] I get the following error:

no matches found: ydata-profiling[notebook]

This happens because pip doesn't recognise the square brackets. The package should use quotes like this 'ydata-profiling[notebook]', so pip can parse the whole string as a package name and pull the required libraries.

Also, the command doesn't need to import sys, you could simplify the command with this !pip install -U 'ydata-profiling[notebook]'.

Furthermore, the !jupyter nbextension enable --py widgetsnbextension command fails because nbextension is not a valid subcommand in the latest version of Jupyter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants