This question has already been answered:
Do documentation https://openpyxl.readthedocs.io/en/default/
installed via pip install openpyxl
from openpyxl import Workbook wb = Workbook() and is not imported:
Traceback (most recent call last): File "D:/OneDrive/WORC/Python/bitrix24/report/openpyxl.py", line 3, in <module> from openpyxl import Workbook File "D:\OneDrive\WORC\Python\bitrix24\report\openpyxl.py", line 3, in <module> from openpyxl import Workbook ImportError: cannot import name 'Workbook' I tried to replace my Workbook with a workbook and it still doesn’t work
openpyxl version 2.4.5 python 3.6.0
pip freezeand check if openpyxl is installed.Затем C:/OneDrive/WORC/Python/Scripts/pip.exe freezeand again verify that the library is there. You can also check what exactly you are running with the commandwhere pip. The library could be installed on some other interpreter, which lies elsewhere. You can look at virtualenv for the future to avoid confusion. - m9_psyopenpyxl.pywhich conflicts with the Python package of the same name. - jfs