davep / pispy

A terminal-based tool for looking up stuff in PyPI
https://pypi.org/project/pispy-client/
GNU General Public License v3.0
24 stars 2 forks source link

ModuleNotFoundError with pipx install #25

Closed kevinbowen777 closed 6 months ago

kevinbowen777 commented 6 months ago

I am getting a ModuleNotFoundError when trying to use PISpy using pipx to install the tool and am unable to run the application.

Commands to reproduce:

Error message output:

$ pispy
Traceback (most recent call last):
  File "/home/kbowen/.local/bin/pispy", line 5, in <module>
    from pispy.__main__ import run
  File "/home/kbowen/.local/pipx/venvs/pispy-client/lib/python3.12/site-packages/pispy/__main__.py", line 14, in <module>
    from .app import PISpy
  File "/home/kbowen/.local/pipx/venvs/pispy-client/lib/python3.12/site-packages/pispy/app.py", line 11, in <module>
    from .widgets import PackageInformation
  File "/home/kbowen/.local/pipx/venvs/pispy-client/lib/python3.12/site-packages/pispy/widgets/__init__.py", line 5, in <module>
    from .package_information import PackageInformation
  File "/home/kbowen/.local/pipx/venvs/pispy-client/lib/python3.12/site-packages/pispy/widgets/package_information.py", line 12, in <module>
    from pkg_resources import parse_requirements
ModuleNotFoundError: No module named 'pkg_resources'

Please let me know if you need additional information.

davep commented 6 months ago

It's likely I've missed something off from setup.cfg when it comes to dependencies; although it's curious I've not seen any other reports of this and I don't see the same with fresh installations (pipx or homebrew) on macOS.

I wonder also if https://stackoverflow.com/questions/61232326/python-pip-no-module-named-pkg-resources might be relevant here (searching the error does seem to turn up a few results with similar issues specifically on Debian).

kevinbowen777 commented 6 months ago

Nice pointer!

After running pipx install pispy-client, I ran the command pipx inject pispy-client setuptools and the application appears to be functioning as expected.

davep commented 6 months ago

I suspect #27 will help out here.