I am trying to run the following pandas code to create a df by reading an excel. However I receive the error below. (I pip-installed the openpyxl but I get the same error.)
import pandas as pd
import numpy as np
df = pd.read_excel("test.xlsx")
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 984, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'openpyxl'
ImportError: Missing optional dependency 'openpyxl'. Use pip or conda to install openpyxl.
pip install openpyxl --upgrade
If this doesn't work, try this too:
pip install pandas --upgrade
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With