Feature Type
-
[ ] Adding new functionality to pandas
-
[x] Changing existing functionality in pandas
-
[ ] Removing existing functionality in pandas
Problem Description
When using a functionality that requires a performance dependency that is not installed, the error message points out a specific library instead of the multiple options that the user has.
See the following report from an earlier, very similar, already closed issue:
Hi, I have just started learning about pandas with "Getting Started tutorials". On the "How do I read and write tabular data?" tutorial when I ran the command got an unexpected error and no suggestion was provided there to solve this issue. The command and error are as follows:
Command:
titanic.to_excel('titanic.xlsx', sheet_name='Passengers', index=False)
Error:
ModuleNotFoundError: No module named 'openpyxl'
I solved the issue by installing
openpyxl
using pip withpip install openpyxl
.[...]
Feature Description
The error message should be changed to something along the lines of:
Missing optional dependency. To use this functionality, you need to install
xlrd, xlsxwriter, openpyxxl, pyxlsb or python-calamine.
Similar error messages should be emitted when trying to use any of the other performance dependencies (plots, computation, HTML, XML, SQL, etc.)
Alternative Solutions
If you are good at searching the web or know Pandas well, you can figure out that you have multiple options, otherwise you just install the module mentioned in the current error message.
Additional Context
No response
Comment From: wilocu
take
Comment From: rhshadrach
When using a functionality that requires a performance dependency that is not installed, the error message points out a specific library instead of the multiple options that the user has.
Can you give a reproducer here? Is it really the case that installing any one of them will resolve the issue?