Deutsch   English   Français   Italiano  
<mailman.13.1744814312.3008.python-list@python.org>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: news.eternal-september.org!eternal-september.org!feeder3.eternal-september.org!fu-berlin.de!uni-berlin.de!not-for-mail
From: Grant Edwards <grant.b.edwards@gmail.com>
Newsgroups: comp.lang.python
Subject: Re: Pip installs to unexpected place
Date: Wed, 16 Apr 2025 10:38:31 -0400 (EDT)
Lines: 30
Message-ID: <mailman.13.1744814312.3008.python-list@python.org>
References: <CAApdmf2J69WgkR159sBSkxN0=mYoNmHZYboBmpPi+LdA-YBNpg@mail.gmail.com>
 <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>
X-Trace: news.uni-berlin.de jrKb0wvCJq76GUaRhLzpSQTTn/tup9iXAhS8F4u58yqQ==
Cancel-Lock: sha1:mVR2GvXaETOUkJyj+eJl+VGz/o8= sha256:WBhqPf5iwQI2o/4etamUHEBnqwWRF6rAZhGPI920Er0=
Return-Path: <grant.b.edwards@gmail.com>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=none reason="no signature";
 dkim-adsp=none (unprotected policy); dkim-atps=neutral
X-Spam-Status: OK 0.006
X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'pip': 0.04; 'linux,':
 0.07; 'insist': 0.09; 'install,': 0.09; 'user.': 0.09; 'that.':
 0.15; 'flag': 0.16; 'from:addr:grant.b.edwards': 0.16;
 'from:name:grant edwards': 0.16; 'mats': 0.16; 'packages,': 0.16;
 'privileges': 0.16; 'wichmann': 0.16; 'wrote:': 0.16; 'python':
 0.16; 'grant': 0.17; 'admin': 0.19; 'installing': 0.19; 'to:addr
 :python-list': 0.20; "i've": 0.22; 'version': 0.23; 'install':
 0.23; 'installed': 0.23; 'run': 0.23; 'saying': 0.25; 'stuff':
 0.25; 'space': 0.26; 'so.': 0.26; '>>>': 0.28; 'header:User-
 Agent:1': 0.30; 'program': 0.32; 'python-list': 0.32; 'but': 0.32;
 'package': 0.34; 'from:addr:gmail.com': 0.34; 'yes,': 0.35;
 'possibly': 0.36; "it's": 0.37; 'use': 0.39; "that's": 0.39;
 'break': 0.39; 'wants': 0.40; 'want': 0.40; 'tell': 0.60; 'true':
 0.63; 'your': 0.64; 'message-id:invalid': 0.69; 'little': 0.73;
 'breaking': 0.78; 'imports': 0.84; 'system).': 0.84; 'warning':
 0.84
User-Agent: slrn/1.0.3 (Linux)
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: General discussion list for the Python programming language
 <python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
 <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
 <mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <4Zd3YM00SYznVKQ@mail.python.org>
X-Mailman-Original-References: <CAApdmf2J69WgkR159sBSkxN0=mYoNmHZYboBmpPi+LdA-YBNpg@mail.gmail.com>
 <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>

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