AnswerDotAI / nbdev

Create delightful software with Jupyter Notebooks
https://nbdev.fast.ai/
Apache License 2.0
4.94k stars 492 forks source link

Python 3.12 No module named 'pkg_resources' #1423

Open fanuch opened 4 months ago

fanuch commented 4 months ago

Python 3.12.4 on Mac

➜ pip install nbdev

➜ nbdev_new
Traceback (most recent call last):
  File "/Users/user/Documents/Code/Shell/NBDev_Tutorial/venv/bin/nbdev_new", line 5, in <module>
    from nbdev.cli import nbdev_new
  File "/Users/user/Documents/Code/Shell/NBDev_Tutorial/venv/lib/python3.12/site-packages/nbdev/__init__.py", line 3, in <module>
    from .doclinks import nbdev_export
  File "/Users/user/Documents/Code/Shell/NBDev_Tutorial/venv/lib/python3.12/site-packages/nbdev/doclinks.py", line 17, in <module>
    import pkg_resources,importlib
ModuleNotFoundError: No module named 'pkg_resources'

Fix required mentioned in #1392 and in issue #1397 raised a fix that was closed?

Non-starter trying to follow the tutorial.

deven367 commented 4 months ago

Hi @fanuch, the issue is kind of stuck till the issue gets resolved in the fastcore library on which nbdev depends. A temporary solution for now would be to use python 3.11 if possible.

awesomo4000 commented 3 months ago

install setuptools

bulletmark commented 3 months ago

Probably should just add setuptools to the dependencies of nbdev, at least until this issue is addressed properly. I and many others use uv which doesn't install setuptools in the venv so this issue is readily apparent.

thisiswhereitype commented 1 month ago

Looks like this happened but got reverted https://github.com/fastai/fastcore/pull/544