nbdev icon indicating copy to clipboard operation
nbdev copied to clipboard

Python 3.12 No module named 'pkg_resources'

Open fanuch opened this issue 1 year ago • 4 comments

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.

fanuch avatar Jul 12 '24 04:07 fanuch

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.

deven367 avatar Jul 12 '24 20:07 deven367

install setuptools

awesomo4000 avatar Aug 08 '24 14:08 awesomo4000

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.

bulletmark avatar Aug 08 '24 22:08 bulletmark

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

thisiswhereitype avatar Oct 08 '24 14:10 thisiswhereitype