Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #197407

Re: Pip installs to unexpected place

From Grant Edwards <grant.b.edwards@gmail.com>
Newsgroups comp.lang.python
Subject Re: Pip installs to unexpected place
Date 2025-04-16 10:38 -0400
Message-ID <mailman.13.1744814312.3008.python-list@python.org> (permalink)
References (1 earlier) <CAN06=CxPNLHtr_sdgphR2jrN1V+WbB8wZDJdbvfEDb-MYtmPHA@mail.gmail.com> <bbe32f47-13d2-459c-af22-4e0e37834091@tompassin.net> <4ZcdYR5WnWznV1q@mail.python.org> <cc1c6cf5-f8b9-4528-b6b0-110499b88162@wichmann.us> <4Zd3YM00SYznVKQ@mail.python.org>

Show all headers | View raw


On 2025-04-16, Mats Wichmann via Python-list <python-list@python.org> wrote:
> On 4/15/25 16:07, Grant Edwards via Python-list wrote:
>> On 2025-04-15, Thomas Passin via Python-list <python-list@python.org> wrote:
>> 
>>> On Linux, at least, it's standard for pip to install into the user's
>>> site-packages location if it's not invoked with admin privileges - even
>>> without --user. Pip will emit a message saying so. Well, that used to be
>>> true but nowadays Pip wants you to use the --break-system-packages flag
>>> if you want to insist on installing into the system's Python install,
>>> even if it's going to go into --user.
>> 
>> I've always been a little baffled by that message when installing with
>> --user.  How can that possibly break system stuff?
>
> Your user install dir is in your python path, so when you go to run an 
> installed Python program which imports other packages, it might pick up 
> the version you have in your user space rather than the system one it 
> was tested with.

Yes, I understand that. But that's breaking stuff for the user not for
the system.  Of course installing stuff for the user can break stuff
for the user.  I don't need a warning to tell me that.

Also... when installing stuff with pip --user, it is always a package
that is not installed for the system (usually not even available for
the system). How can that "break system packages"?

--
Grant

Back to comp.lang.python | Previous | Next | Find similar


Thread

Re: Pip installs to unexpected place Grant Edwards <grant.b.edwards@gmail.com> - 2025-04-16 10:38 -0400

csiph-web