← Back to issue list

Error installing Python packages fails with trace

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1753965
Type
issue
State
open
Author
~kalikiana
Labels
stacktrace
Created
Updated
Closed

Current evaluation

Python plugin pip install failures (PyPI miss, VCS clone fail, HTTP 404) abort snapcraft with raw pip output plus a long traceback instead of a clean error. 8.5 years old, zero comments, references removed code path snapcraft/plugins/_python/_pip.py.

Suggested action: close stale

Reason: The issue is 8.5 years old with zero maintainer interaction and references snapcraft/plugins/_python/_pip.py, a file from the pre-3.0 plugin architecture that no longer exists in the codebase (current layout shows snapcraft/parts/ with no snapcraft/plugins/ directory). The old plugin system was fully replaced by the parts-based architecture, making the reported code path no longer applicable.

Impact: 25 Quick Win: 16.25 Staleness: 92 Complexity: 35 Confidence: 68 Support Request: 10

Issue body

When using the Python plugin and there's a problem installing a Python package, Snapcraft aborts with both a verbatim error message from pip as well as a long trace. There's 3 ways to get this to happen which go through the same code path which is why I'm filing one bug for it: - A package from index (PyPI) can't be installed. - The URL to a VCS branch can't be cloned. - An error occurs downloading via http(s) eg. HTTP 404. parts: foo: plugin: python python-packages: - <email address hidden>:kalikiana/does-not-exist.git#egg=ham - http://someserver.org/packages/MyPackage-3.0.tar.gz See below for abbreviated traces going through "Pip.download": Collecting pip Could not find a version that satisfies the requirement pip (from versions: ) No matching distribution found for pip Traceback (most recent call last): [...] File "/home/rumo/dev/snapcraft/snapcraft/plugins/_python/_pip.py", line 196, in _ensure_pip_installed self.download({'pip'}) [...] File "/usr/lib/python3.5/subprocess.py", line 581, in check_call raise CalledProcessError(retcode, cmd) Invalid requirement: '<email address hidden>:kalikiana/does-not-exist.git' It looks like a path. Does it exist ? Traceback (most recent call last): [...] File "/home/rumo/dev/snapcraft/snapcraft/plugins/_python/_pip.py", line 275, in download self._python_package_dir] + args, cwd=cwd) [...] File "/usr/lib/python3.5/subprocess.py", line 581, in check_call raise CalledProcessError(retcode, cmd) Collecting http://someserver.org/packages/MyPackage-3.0.tar.gz HTTP error 404 while getting http://someserver.org/packages/MyPackage-3.0.tar.gz Could not install requirement http://someserver.org/packages/MyPackage-3.0.tar.gz because of error 404 Client Error: Not Found for url: http://someserver.org/packages/MyPackage-3.0.tar.gz Could not install requirement http://someserver.org/packages/MyPackage-3.0.tar.gz because of HTTP error 404 Client Error: Not Found for url: http://someserver.org/packages/MyPackage-3.0.tar.gz for URL http://someserver.org/packages/MyPackage-3.0.tar.gz Traceback (most recent call last): [...] File "/home/rumo/dev/snapcraft/snapcraft/plugins/_python/_pip.py", line 275, in download self._python_package_dir] + args, cwd=cwd) [...] File "/usr/lib/python3.5/subprocess.py", line 581, in check_call raise CalledProcessError(retcode, cmd)

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 25
Quick Win: 16.25
Staleness: 92
Complexity: 35
Confidence: 68
Support Request: 10
close stale Python plugin pip install failures (PyPI miss, VCS clone fail, HTTP 404) abort snapcraft with raw pip output plus a long traceback instead of a clean error. 8.5 years old, zero comments, references removed code path snapcraft/plugins/_python/_pip.py.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 25
Confidence: 85
Support Request: 5
close stale Snapcraft Python plugin crashes with full tracebacks when pip fails to install packages. Untriaged, zero comments, over 8 years old.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 40
Confidence: 90
Support Request: 10
close stale Snapcraft's Python plugin prints full Python tracebacks instead of clean error messages when pip fails to install packages. The issue is over 8 years old with no maintainer response or comments.
qwen3.6-35b-a3b-mtp-q6
Staleness: 98
Complexity: 20
Confidence: 90
Support Request: 5
close stale Snapcraft's Python plugin exposes full Python tracebacks to users when pip fails to install packages. Issue is untriaged, has no comments, and is over 8 years old.
qwen3.6-35b-a3b-mtp-q6
Staleness: 99
Complexity: 20
Confidence: 90
Support Request: 5
close stale Snapcraft's Python plugin prints full tracebacks instead of clean errors when pip fails to install packages. Remains open, stale, and unassigned, awaiting triage and a fix to improve error handling.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#1673658 python package failed to install because of directories in the source snapcraft (launchpad) open Snapcraft 2.27.1-era report that the python plugin fails to install packages when the source contains directories, leaving the executable unstaged. No comments, author account deactivated, and the affected version is long obsolete.
73%
#1604909 Python3 plugin fails to install requirements that are only available as wheels snapcraft (launchpad) open Snapcraft 1.x python3 plugin passed --install-option=--prefix=usr to pip 8.1.2, which disabled wheel usage and broke installs of wheel-only packages (e.g. entrypoints). 10 years old, 0 comments, no maintainer interaction; the plugin was since rewritten in the modern craft-parts codebase.
71%