Python system apps must hardcode system python in #! line
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gnome-app-install |
Fix Released
|
Undecided
|
Michael Vogt |
Bug Description
I just attempted an upgrade from feisty to gutsy, but this upgrade eventually failed with an import error:
Setting up gnome-app-install (0.4.8-0ubuntu1) ...
Traceback (most recent call last):
File "/usr/sbin/
from AppInstall.update import main
ImportError: No module named AppInstall.update
dpkg: error processing gnome-app-install (--configure):
subprocess post-installation script returned error exit status 1
It strikes me that I've seen this probably before with incorrectly written system applications. See for example this bug:
https:/
The problem will often hit Python developers such as myself. While it is generally correct to recommend that the #! line for development packages be
#! /usr/bin/env python
it is actually /incorrect/ to use this line in system tools because if I have a development Python in my $PATH, the tool will break. The expected packages won't be present in my dev Python's site-packages.
In fact, Python's own distutils/
In short: system tools /must always/ use the system python.
Changed in gnome-app-install: | |
assignee: | nobody → mvo |
status: | New → Fix Committed |
Fixed in 0.4.10-0ubuntu1