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 it is a very bad idea to do it in /usr. Yes, you can teach your users to add things to their PYTHONPATH, but this put one additional thing to learn for people who just want to get things done. I think users are going to hate this. Maybe something less drastic can be done, by making sure that the /usr/local is far in the PYTHONPATH, that way packages installed in /usr/local do not override the system packages. Of course setuptools will break this, because it adds itsef to front of the PYTHONPATH, and totally break the PYTHONPATH semantics (Grrr). I still think you guys have it wrong, and if you want a new Python install, you do it in /opt. For me /usr/local is for user programs that cooperate for system programs. My 2 cents, Gaƫl