Python easy_install fails when second of two python parts builds
Metadata
Current evaluation
Closed as obsolete after the Python plugin's installation strategy changed; multiple Python parts gained support in canonical/snapcraft#3451 (932288fed).
Resolution: closed stale
Reason: A maintainer closed the report in May 2020, stating that the former installation strategy had been replaced and that multiple Python parts had long been supported. PR #3451 was merged to fix multiple Python parts using staged Python.
Evaluated by: mr-cal-bot
No scores available.
Issue body
When two python parts are used and one uses after: the dependent part fails to
build when easy_install gets confused about PYTHON pathing.
snapcraft.yaml
name: mojo
version: 0.1
summary: A deployment workflow system for Juju
description: A deployment workflow system for Juju
confinement: devmode
apps:
mojo:
command: usr/bin/mojo
codetree:
command: usr/bin/codetree
parts:
codetree:
plugin: python2
source: lp:codetree
source-type: bzr
build-packages: [bzr, python-setuptools, python-requests]
stage-packages: [python-bzrlib, git, rsync, unzip, bzr]
mojo:
plugin: python2
source-type: bzr
source: lp:mojo
after: [codetree]
build-packages: [gcc, python-dev]
stage-packages: [juju-1.25, juju-deployer, python-jujuclient]
python2 /home/ubuntu/snap/parts/mojo/install/usr/bin/easy_install --prefix /home/ubuntu/snap/parts/mojo/install/usr pip
TEST FAILED:
/home/ubuntu/snap/parts/mojo/install/usr/lib/python2.7/site-packages does NOT support .pth files
error: bad install directory or PYTHONPATH
You are attempting to install a package to a directory that is not
on PYTHONPATH and which Python does not read ".pth" files from. The
installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:
/home/ubuntu/snap/parts/mojo/install/usr/lib/python2.7/site-packages
and your PYTHONPATH environment variable currently contains:
'/home/ubuntu/snap/stage/usr/lib/python2.7/dist-packages'
Here are some of your options for correcting the problem:
* You can choose a different installation directory, i.e., one that is
on PYTHONPATH or supports .pth files
* You can add the installation directory to the PYTHONPATH environment
variable. (It must then also be on PYTHONPATH whenever you run
Python and want to use the package(s) you are installing.)
* You can set up the installation directory to support ".pth" files by
using one of the approaches described here:
https://pythonhosted.org/setuptools/easy_install.html#custom-installation-locations
Please make the appropriate changes for your system and try again. Command '['/bin/sh', '/tmp/tmpemzbmknq', 'python2',
'/home/ubuntu/snap/parts/mojo/install/usr/bin/easy_install', '--prefix', '/home/ubuntu/snap/parts/mojo/install/usr', 'pip']' returned non-zero exit status 1
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed stale | Closed as obsolete after the Python plugin's installation strategy changed; multiple Python parts gained support in canonical/snapcraft#3451 (932288fed). | |
| stealth/space-bunny-alpha | — | closed not a bug | easy_install/PYTHONPATH failure with chained python parts was closed in 2020 by sergiusens, who noted the installation strategy changed long ago and multiple python parts have been supported since; no specific fix PR was cited. | |
| stealth/space-bunny-alpha | — | closed resolved | Fixed by PR #3451 (commit 932288fed), correcting Python v2 plugin handling of multiple parts with staged Python. | |
| stealth/space-bunny-alpha | — | closed stale | Reported easy_install failure for a dependent second Python part was closed without a documented fix; no resolving PR or commit was found. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without resolution. easy_install failed in dependent Python parts due to PYTHONPATH conflicts. Likely abandoned due to age and deprecated tooling. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without resolution. The easy_install PYTHONPATH conflict during sequential Python part builds was abandoned, likely superseded by pip adoption and Snapcraft plugin updates. |
Update history
| Date | Change |
|---|---|
| created |
Related work
-
Likely Fixed By:
canonical/snapcraft#3451
(confidence 90%)
Merged commit 932288fed fixed conflicts and broken interpreter links for multiple parts staging Python.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1617907 Two python parts in the same snapcraft.yaml result in not installing the python correctly | snapcraft (launchpad) | open | Snapcraft 2.14 fails when multiple Python parts stage conflicting interpreter files. Similarity to resolved bug #1531570 was disputed, and the old report remains unverified. |