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

pipx install pulp-cli[pygments] does not correctly install setuptools on Python 3.12 #865

Closed
JeppeKlitgaard opened this issue Jan 16, 2024 · 3 comments · Fixed by #866
Closed
Assignees
Labels
bug Something isn't working (template-set) Triage-Needed Needs to be reviewed at next pulp-cli mtg

Comments

@JeppeKlitgaard
Copy link

Summary

On an Ubuntu 22.04 server, installation via pipx does not work out of the box

Steps to reproduce

  1. pipx install pulp-cli[pygments]
  2. pulp

Gives

Traceback (most recent call last):
  File "/home/jkl/.local/bin/pulp", line 5, in <module>
    from pulp_cli import main
  File "/home/jkl/.local/share/pipx/venvs/pulp-cli/lib/python3.12/site-packages/pulp_cli/__init__.py", line 5, in <module>
    import pkg_resources
ModuleNotFoundError: No module named 'pkg_resources'

Expected behavior

For pulp-cli to run

Pulp and pulp-cli version info

  • pulp3 command line interface, version 0.22.0

Fix

This can be manually fixed by issuing:

pipx inject pulp-cli[pygments] setuptools
@JeppeKlitgaard JeppeKlitgaard added bug Something isn't working (template-set) Triage-Needed Needs to be reviewed at next pulp-cli mtg labels Jan 16, 2024
@mdellweg mdellweg self-assigned this Jan 16, 2024
@mdellweg
Copy link
Member

On a first attempt I could not reproduce this on a debian machine. Probably I have the setuptools package installed globally.

mdellweg added a commit to mdellweg/pulp-cli that referenced this issue Jan 16, 2024
Replaces all uses of pkg_resources with importlib, because the former
has been deprecated.

fixes pulp#865
@mdellweg mdellweg mentioned this issue Jan 16, 2024
3 tasks
mdellweg added a commit to mdellweg/pulp-cli that referenced this issue Jan 16, 2024
Replaces all uses of pkg_resources with importlib, because the former
has been deprecated.

fixes pulp#865
mdellweg added a commit to mdellweg/pulp-cli that referenced this issue Jan 16, 2024
Replaces all uses of pkg_resources with importlib, because the former
has been deprecated.

fixes pulp#865
mdellweg added a commit to mdellweg/pulp-cli that referenced this issue Jan 16, 2024
Replaces all uses of pkg_resources with importlib, because the former
has been deprecated.

fixes pulp#865
mdellweg added a commit to mdellweg/pulp-cli that referenced this issue Jan 16, 2024
Replaces all uses of pkg_resources with importlib, because the former
has been deprecated.

fixes pulp#865
mdellweg added a commit to mdellweg/pulp-cli that referenced this issue Jan 16, 2024
Replaces all uses of pkg_resources with importlib, because the former
has been deprecated.

fixes pulp#865
mdellweg added a commit to mdellweg/pulp-cli that referenced this issue Jan 16, 2024
Replaces all uses of pkg_resources with importlib, because the former
has been deprecated.

fixes pulp#865
@JeppeKlitgaard
Copy link
Author

On a first attempt I could not reproduce this on a debian machine. Probably I have the setuptools package installed globally.

I reckon you're right that python3-setuptools being installed may fix this. I think you've already managed to fix this (thank you for the rather incredible turn-around time on that!). I am happy to try and reproduce this in a Dockerfile if you think that would be helpful

mdellweg added a commit that referenced this issue Jan 16, 2024
Replaces all uses of pkg_resources with importlib, because the former
has been deprecated.

fixes #865
@mdellweg
Copy link
Member

On a first attempt I could not reproduce this on a debian machine. Probably I have the setuptools package installed globally.

I reckon you're right that python3-setuptools being installed may fix this. I think you've already managed to fix this (thank you for the rather incredible turn-around time on that!). I am happy to try and reproduce this in a Dockerfile if you think that would be helpful

I'd love to hear you confirming that this approach works. It turned out that using pkg_resources was deprecated after all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working (template-set) Triage-Needed Needs to be reviewed at next pulp-cli mtg
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants