Gael Varoquaux wrote:
On Sun, Apr 13, 2008 at 11:16:57AM -0400, Stephen Waterbury wrote:
On Debian and derivatives (e.g. Ubuntu) you might have even more fun. They put /usr/local/lib/pythonX.Y/site-packages on the sys.path *of the system python*! This means that you can break your system Python by installing a version of Python from source and then distutil'ing things into there. Astoundingly, this is promoted as a feature.
That *is* astounding. I've been using Ubuntu for several years now, and I blush to admit I never noticed that until just the other day when I tried installing Python 2.6 from source (into the default /usr/local location, of course) and it broke all my running web stuff, so I hastily removed it -- sheesh!
As I mentioned, I've been "lazy" about using the system Python for my own apps and development, but I would feel much more comfortable if the system Python had its own space.
I've reported bugs on this and had discussions with some of the Debian Python packaging folks. I'm hoping that we'll find a solution that doesn't collide with a from-source default Python build.
Well, I am not too happy about what I hear here. It seems to me as if Ubuntu is headed the macOS X way, where (it seems) that a second Python needs to be installed on top of the system Python to add modules to it. I know it is not exactly the case, but this change is _really_ going to confuse people and I can this the mailing lists of module developper pilling up with requests for help. There needs to be a way for the user to install his own modules and keep using the system Python.
I think you misunderstand my proposal, Gael ... You and I are using "system Python" to mean different things. In my proposal, *the* "system Python" and a packaged Python installed using the system's package manager would be separate things (and may or may not be the same version of Python)! What I am proposing: 1) the OS comes with its own "system Python", which is installed not as the "python" package, but as some OS-required package (maybe call it "system-python" or something) and it goes into /usr/system/bin/python or whatever -- it doesn't matter what the path is as long as it's not /usr/bin or anything on the default path. And system utilities that are python scripts should have their own system-specific, hard-coded shebang line. 2) separately from the "system Python", the available packages shown by the system's package manager include one or more "python.x" packages which are python interpreters that the user or sysadmin can optionally install, and which go into /usr. And the system package manager -- e.g., apt on Debian/Ubuntu systems) would have all its usual nicely-packaged python apps (python-this, python-that, ...) that would also install into /usr and use the nicely-packaged python (not to be confused with the "system Python" of 1). Steve