"Don't install on the system Python"

Richard Damon Richard at Damon-Family.org
Sun Dec 1 13:35:31 EST 2019


On 12/1/19 10:41 AM, Michael Torrie wrote:
> On 11/30/19 9:42 PM, John Ladasky wrote:
>> Can anyone provide concrete examples of problems arising from
>> installing modules on top of the system Python?  Am I courting
>> disaster?
> No you aren't.  I've also never had any problems. I've installed many
> things into my root system Python installation with pip including PyQt5.
>  It's just easier for me to have them in the system installation.  I'm
> on a CentOS 7 box, which depends on Python 2 for a lot of system
> functions. I've moved to Python 3 now, so I mess with the system Python
> less and less.  I understand that I probably should be using a
> virtualenv and pip installing into that, but I'm just too lazy.
>
> A couple of years ago I even managed to upgrade the system Python from
> 2.6 to 2.7 without any issues. I ended up making an RPM that neatly
> upgraded the system one.  I also have upgraded the gtk2 bindings and the
> GTK2 library itself (again building RPMs), and everything worked fine,
> even the graphical centos utilities.
>
> The only problems I've ever heard of come from trying to manually remove
> stuff from Python that the system depended on.  I've never heard of any
> problems installing additional modules.  90% of the time the module you
> need will be in the repositories, so no worries there at all. And not
> much to worry about for the rest.

My guess is that the issue is with some more complicated/esoteric
packages. Especially if there are ones that don't maintain strict
backwards compatibility, so that some packages using them have a maximum
usable version as well as a minimum usable version. This can lead to
troubles as some packages become incompatible because one needs a
version greater than x, while another needs a version less than x.

-- 
Richard Damon



More information about the Python-list mailing list