nautobot / pynautobot

Nautobot Python SDK
https://pynautobot.readthedocs.io/en/latest/index.html
Apache License 2.0
34 stars 29 forks source link

ModuleNotFoundError: No module named `pkg_resources` on Fresh Install #198

Closed jvanderaa closed 3 days ago

jvanderaa commented 1 month ago

With a fresh installation of an environment with pynautobot 2.2.0 get the traceback:

Traceback (most recent call last):
  File "/home/joshv/projects/sandbox-python/mac_agents_transform.py", line 3, in <module>
    import pynautobot
  File "/home/joshv/.cache/pypoetry/virtualenvs/sandbox-python-Fd9X2G4n-py3.12/lib/python3.12/site-packages/pynautobot/__init__.py", line 5, in <module>
    from pkg_resources import get_distribution, DistributionNotFound
ModuleNotFoundError: No module named 'pkg_resources'
glennmatthews commented 1 month ago

Probably a 3.12-specific issue, as pkg_resources is removed from the Python stdlib in 3.12 and later.

tsm1th commented 4 days ago

Started looking at this and quickly noticed this is fixed in develop branch with PR #191. Just need a release cut to close this.

joewesch commented 3 days ago

Release v2.2.1 is out that should include this fix. If this is not the case, feel free to reopen this issue.