heiseacademy / ml-python

Begleitmaterial für den Kurs Machine Learning mit Python
1 stars 1 forks source link

02-ml-intro/03-Einlesen_Akquisition.ipynb is missing a pip install: ModuleNotFoundError: No module named 'openpyxl' #1

Open bmerkle opened 1 month ago

bmerkle commented 1 month ago

I followed the instructions and ran into a small issue with 02-ml-intro/03-Einlesen_Akquisition.ipynb the module openpyxl is not found, so i think this should be added to the instructions.

maybe we can have a requirements.txt in the repo (in each subdirectory) to add the libraries via pip install or conda equivalent.

here is the stacktrace:

ModuleNotFoundError Traceback (most recent call last) File C:\work\heise\venv\Lib\site-packages\pandas\compat_optional.py:135, in import_optional_dependency(name, extra, errors, min_version) 134 try: --> 135 module = importlib.import_module(name) 136 except ImportError:

File C:\Program Files\Python311\Lib\importlib__init__.py:126, in import_module(name, package) 125 level += 1 --> 126 return _bootstrap._gcd_import(name[level:], package, level)

File :1204, in _gcd_import(name, package, level)

File :1176, in _find_andload(name, import)

File :1140, in _find_and_loadunlocked(name, import)

ModuleNotFoundError: No module named 'openpyxl'

During handling of the above exception, another exception occurred:

ImportError Traceback (most recent call last) Cell In[4], line 1 ----> 1 pd.read_excel("stundenplan.xlsx")

bmerkle commented 1 month ago

pip install openpyxl fixed the problem

bmerkle commented 1 month ago

in the fix i will change !pip install to %pip install https://github.com/microsoft/vscode-jupyter/wiki/Installing-Python-packages-in-Jupyter-Notebooks