Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModuleNotFoundError with pipx install #25

Closed
kevinbowen777 opened this issue Apr 20, 2024 · 3 comments · Fixed by #27
Closed

ModuleNotFoundError with pipx install #25

kevinbowen777 opened this issue Apr 20, 2024 · 3 comments · Fixed by #27

Comments

@kevinbowen777
Copy link

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

  • OS: Debian 12 stable
  • Python version: 3.12.3 (and 3.11.9)

Commands to reproduce:

  • pipx install pispy-client
  • pipx install pispy-client --include-deps
  • pipx install pispy-client==0.5.0 (I have tried all release versions back to 0.1.0 with the same error output.)

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
Copy link
Owner

davep commented Apr 20, 2024

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
Copy link
Author

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 added a commit that referenced this issue Apr 22, 2024
I suspect this will help resolve #25 given that pkg_resources seems to be
deprecated.
@davep davep linked a pull request Apr 22, 2024 that will close this issue
@davep davep closed this as completed in #27 Apr 22, 2024
@davep
Copy link
Owner

davep commented Apr 22, 2024

I suspect #27 will help out here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants