Hello, I am getting the following error in my code even though I downloaded the library.
Traceback (most recent call last):
File “C:\Users\Oyuncu\AppData\Local\Programs\Python\Python311\Lib\site-packages\pandas\compat_optional.py”, line 132, in import_optional_dependency
module = importlib.import_module(name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\Oyuncu\AppData\Local\Programs\Python\Python311\Lib\importlib_init_.py”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “”, line 1204, in _gcd_import
File “”, line 1176, in _find_and_load
File “”, line 1140, in _find_and_load_unlocked
ModuleNotFoundError: No module named ‘openpyxl’
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “c:\Users\Oyuncu\Desktop\Projeler_Phyton\Taş_Kağıt_Makas Oyunu\GameMain.py”, line 71, in
df = pd.read_excel(‘Data.xlsx’)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\Oyuncu\AppData\Local\Programs\Python\Python311\Lib\site-packages\pandas\io\excel_base.py”, line 504, in read_excel
io = ExcelFile(
^^^^^^^^^^
File “C:\Users\Oyuncu\AppData\Local\Programs\Python\Python311\Lib\site-packages\pandas\io\excel_base.py”, line 1580, in init
self._reader = self._engines[engine](
^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\Oyuncu\AppData\Local\Programs\Python\Python311\Lib\site-packages\pandas\io\excel_openpyxl.py”, line 552, in init
import_optional_dependency(“openpyxl”)
File “C:\Users\Oyuncu\AppData\Local\Programs\Python\Python311\Lib\site-packages\pandas\compat_optional.py”, line 135, in import_optional_dependency
raise ImportError(msg)
ImportError: Missing optional dependency ‘openpyxl’. Use pip or conda to install openpyxl.