ae2018 =
pd.read_excel(
r'2018 AE Summary.xlsx',
sheet_name='2018 AE')
This line of code was run in Jyputer notebook, and it gave the following error:
Output exceeds the
size limit. Open the full output data
in a text editor---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
File c:\Users\ankit\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\compat\_optional.py:138, in import_optional_dependency(name, extra, errors, min_version)
137 try:
--> 138 module = importlib.import_module(name)
139 except ImportError:
File c:\Users\ankit\AppData\Local\Programs\Python\Python310\lib\importlib\__init__.py:126, in import_module(name, package)
125 level += 1
--> 126 return _bootstrap._gcd_import(name[level:], package, level)
File <frozen importlib._bootstrap>:1050, in _gcd_import(name, package, level)
File <frozen importlib._bootstrap>:1027, in _find_and_load(name, import_)
File <frozen importlib._bootstrap>:1004, in _find_and_load_unlocked(name, import_)
ModuleNotFoundError: No module named 'openpyxl'
During handling of the above exception, another exception occurred:
ImportError Traceback (most recent call last)
Cell In [19], line 1
----> 1 ae2018 = pd.read_excel(r'2018 AE Summary.xlsx',sheet_name='2018 AE')
...
--> 141 raise ImportError(msg)
142 else:
143 return None
ImportError: Missing optional dependency 'openpyxl'. Use pip or conda to install openpyxl.
After receiving this message, I have installed openpyxl in the project environment, but it gives the same error. I don't know why this error persists even though I am not using openpyxl library to read the .xlsl file. Can anyone kindly let me know what the issue maybe?