Closed dlorenc closed 1 year ago
pip is there. just need to add shell i guess.
@tuananh I ran your command:
docker run -it --rm --entrypoint pip cgr.dev/chainguard/python --version
but got the following error indicating that pip is not installed:
Traceback (most recent call last):
File "/usr/lib/python3.11/importlib/metadata/__init__.py", line 563, in from_name
return next(cls.discover(name=name))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
StopIteration
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/pip", line 33, in <module>
sys.exit(load_entry_point('pip==22.3.1', 'console_scripts', 'pip')())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/bin/pip", line 22, in importlib_load_entry_point
for entry_point in distribution(dist_name).entry_points
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/importlib/metadata/__init__.py", line 981, in distribution
return Distribution.from_name(distribution_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/importlib/metadata/__init__.py", line 565, in from_name
raise PackageNotFoundError(name)
importlib.metadata.PackageNotFoundError: No package metadata was found for pip
@simon-sk lol i seriously dont know why. as you can see from the screenshot.
i just pulled the latest image and got the same message as yours
@tuananh I suspect that you might've had an older version of the image before that still had pip installed?
@amouat to prioritise
The cgr.dev/chainguard/python:latest-dev
does have a shell, but not pip:
> docker run -it --rm cgr.dev/chainguard/python:latest-dev sh
/ $ python -m pip
/usr/bin/python: No module named pip
/ $ pip
Traceback (most recent call last):
File "/usr/lib/python3.11/importlib/metadata/__init__.py", line 563, in from_name
return next(cls.discover(name=name))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
StopIteration
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/pip", line 33, in <module>
sys.exit(load_entry_point('pip==22.3.1', 'console_scripts', 'pip')())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/bin/pip", line 22, in importlib_load_entry_point
for entry_point in distribution(dist_name).entry_points
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/importlib/metadata/__init__.py", line 981, in distribution
return Distribution.from_name(distribution_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/importlib/metadata/__init__.py", line 565, in from_name
raise PackageNotFoundError(name)
importlib.metadata.PackageNotFoundError: No package metadata was found for pip
/ $ python -c 'import pip'
Traceback (most recent call last):
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'pip'
Yeah, there's something broken in the pip3 package. Let's get this fixed.
I think @kaniini mentioned this may be fixed by a build that was happening today.
should be fixed in our latest build.
What software would you like us to add to our image catalog? (one per issue please)
The existing python image doesn't contain pip or a shell, making it hard to use as a build container. Ideally we should be able to model a Dockerfile like this:
Or something similar.
which versions of the containerized software do you need?
No response
Add some justification for why this specific image and versions are important.
No response