← 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 package failures show pip's error plus a long internal traceback; linked PR #2004 was incomplete because _pip bypassed the plugin execution API, with no later resolution reported.

Suggested action: keep open

Reason: The report gives three reproducible failures sharing Pip.download, and the reporter explicitly confirmed that PR #2004 did not fix the problem because _pip called snapcraft.internal.common.run directly. Although that legacy implementation has since moved, the replacement behavior has not been documented as fixed and should be regression-tested before closure.

Evaluated by: mr-cal-bot

Impact: 35 Quick Win: 19 Complexity: 38 Confidence: 84 Actionability: 86

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
stealth/space-bunny-alpha
Impact: 35
Quick Win: 19
Complexity: 38
Confidence: 84
Actionability: 86
keep open Python package failures show pip's error plus a long internal traceback; linked PR #2004 was incomplete because _pip bypassed the plugin execution API, with no later resolution reported.
stealth/space-bunny-alpha
Impact: 30
Quick Win: 21
Complexity: 20
Confidence: 93
Actionability: 88
close stale Legacy Python package-install failures in Snapcraft's removed _pip.py path emitted duplicate errors and tracebacks; that code path has been replaced by craft-parts shell commands.
qwen/qwen3.6-35b-a3b
Impact: 20
Quick Win: 14
Complexity: 10
Confidence: 85
Actionability: 80
close resolved Python plugin pip errors produce verbose tracebacks. The old _pip.py code path no longer exists; plugin now delegates to craft-parts library.
qwen/qwen3.8-27b
Impact: 25
Quick Win: 16
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.

Update history

Date Change
created

Related work

  • Related To: snapcore/snapcraft#2004 (confidence 100%)

    A maintainer linked this attempted fix, but the reporter said it missed the internal _pip execution path.

Related issues

No related issues found above the similarity threshold.