Skip to content

ModuleNotFoundError: No module named 'pkg_resources' #188

@StefanLobbenmeier

Description

@StefanLobbenmeier

I installed this via pipx on macOS 14.4.

brew install pipx

pipx install audible-cli

pipx ensurepath

audible
Traceback (most recent call last):
  File "~/.local/bin/audible", line 7, in <module>
    from audible_cli import main
  File "~/Library/Application Support/pipx/venvs/audible-cli/lib/python3.12/site-packages/audible_cli/__init__.py", line 5, in <module>
    from .cli import main, quickstart
  File "~/Library/Application Support/pipx/venvs/audible-cli/lib/python3.12/site-packages/audible_cli/cli.py", line 3, in <module>
    from pkg_resources import iter_entry_points
ModuleNotFoundError: No module named 'pkg_resources'

To solve this I had to add setuptools:

pipx runpip audible-cli install setuptools
Collecting setuptools
  Using cached setuptools-69.2.0-py3-none-any.whl.metadata (6.3 kB)
Using cached setuptools-69.2.0-py3-none-any.whl (821 kB)
Installing collected packages: setuptools
Successfully installed setuptools-69.2.0

And now the audible command works 😄

FYI this is the requirements that were installed by pipx (before I ran the additional install):

pipx runpip audible-cli list
Package        Version
-------------- --------
aiofiles       23.2.1
anyio          4.3.0
audible        0.8.2
audible-cli    0.2.6
beautifulsoup4 4.12.3
certifi        2024.2.2
click          8.1.7
h11            0.14.0
httpcore       0.16.3
httpx          0.23.3
idna           3.6
packaging      24.0
pbkdf2         1.3
pillow         10.2.0
pip            24.0
prompt-toolkit 3.0.36
pyaes          1.6.1
pyasn1         0.5.1
questionary    2.0.1
rfc3986        1.5.0
rsa            4.9
sniffio        1.3.1
soupsieve      2.5
tabulate       0.9.0
toml           0.10.2
tqdm           4.66.2
wcwidth        0.2.13

I suppose fixing this is just adding setuptools to the requirements?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdependenciesPull requests that update a dependency file

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions