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

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

Path: ...!3.eu.feeder.erje.net!feeder.erje.net!news.in-chemnitz.de!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: Thomas Passin <list1@tompassin.net>
Newsgroups: comp.lang.python
Subject: Re: Pip installs to unexpected place
Date: Tue, 15 Apr 2025 14:12:19 -0400
Lines: 52
Message-ID: <mailman.9.1744749213.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>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: news.uni-berlin.de +Y/tolmoMo+TlLWHqRwkaw+qURkIO0nntwPGHRfP9NMQ==
Cancel-Lock: sha1:Ac2Pwpoy5CyA3ZHgyMtad5GMPBA= sha256:KEVtcGhfG12rjckT4F40Vvond2RH7j4sINq1RzudIRM=
Return-Path: <list1@tompassin.net>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
 reason="2048-bit key; unprotected key"
 header.d=tompassin.net header.i=@tompassin.net header.b=1mojxGRa;
 dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.002
X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'pip': 0.04; 'have,': 0.07;
 'linux,': 0.07; 'insist': 0.09; 'install,': 0.09; 'line:': 0.09;
 'linux': 0.09; 'schrieb': 0.09; 'url:stable': 0.09; '2025': 0.16;
 'command.': 0.16; 'flag': 0.16; 'present,': 0.16; 'privileges':
 0.16; 'received:10.0.0': 0.16; 'received:64.90': 0.16;
 'received:64.90.62': 0.16; 'received:64.90.62.162': 0.16;
 'received:dreamhost.com': 0.16; 'restriction': 0.16; 'specify':
 0.16; 'virtualenv': 0.16; 'wrote:': 0.16; 'python': 0.16; 'admin':
 0.19; 'installing': 0.19; 'pm,': 0.19; 'to:addr:python-list':
 0.20; 'install': 0.23; 'installed': 0.23; 'saying': 0.25; 'so.':
 0.26; 'fact': 0.28; 'version.': 0.28; 'environment': 0.29; 'it,':
 0.29; 'header:User-Agent:1': 0.30; 'python-list': 0.32;
 'received:10.0': 0.32; 'received:mailchannels.net': 0.32;
 'received:relay.mailchannels.net': 0.32; 'but': 0.32; "i'm": 0.33;
 'there': 0.33; 'header:In-Reply-To:1': 0.34; 'following': 0.35;
 'this.': 0.35; 'files': 0.36; 'built': 0.36; 'people': 0.36;
 'using': 0.37; "it's": 0.37; 'directory': 0.37; 'though': 0.37;
 'file': 0.38; 'best,': 0.38; 'put': 0.38; 'list': 0.39; 'use':
 0.39; 'received:100': 0.39; 'wants': 0.40; 'want': 0.40;
 'forward': 0.62; 'true': 0.63; 'your': 0.64; 'his': 0.65; 'url-
 ip:104.16/16': 0.65; 'look': 0.65; 'header:Received:6': 0.67;
 'received:64': 0.68; 'skip:/ 10': 0.69; 'took': 0.69; 'instead,':
 0.70; 'virtual': 0.71; 'stressed': 0.84
X-Sender-Id: dreamhost|x-authsender|tpassin@tompassin.net
ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1744740740; a=rsa-sha256;
 cv=none;
 b=HWt2hsHQcTQOwlkLaRHB3mG0BEuMU+tveOq6H2B4XcKOP5prWWxA91HpdhLUhZUGdcGXt/
 obbtoRqCeUWV/5V1402+KMx1T7pJOI89du1LD18Zem7qSFrasKTfNmD86qNMiDKLrURfTX
 +LFN7ptUjBvsOook07zo4maNCR/BiatpQmX9wFLQ5SUqbHapsdFcSDK6j1YKJEzjaVQZNV
 MzzSOtRRlsbvWH2IVWzaUxgd2Z2SFM9GW9+S1z1eRTgIQs/G/dNlP8SYmiiB6Q22OgS/pd
 jA+taqTgZadeypVbdRxIh/8ElVAFUPcgAiiGWJZJYVukwnFE1VJKIv3nLjkVlQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed;
 d=mailchannels.net; s=arc-2022; t=1744740740;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references:dkim-signature;
 bh=rC6533uGLB1CkntvHIJo+i/5WZ8D9bhw8ovsmzaGFP4=;
 b=RQeSWdpNx7aN+MzkzrbhdPvk+pLtA+v7fFFjZaWVhl8NrpWy+1Bgpooy0NK1lTmiD3ZEGT
 s1luy7SGK3Cp6fKBFLugBmiRQG5RkO9/2RHW8WNS8Bz3fMteXMzxdUwVvodF6+iPH8/DUH
 RIgzAB2Q3FnZomyCrMgILvJqN8Q7tQeEZ0vqQJblNa2Fttp305OT7BfLO+XzUE/gBQJEbu
 ++KLKU14kKu61RvGYhysDz3WfTVZFpM0aUIBaFZW7nmUa+zaB9XYNiSwZzcaROfIQvfikT
 KM5lSCjbPD7V1SUJv9YRa33BMAyq8I7vCDTQhdz6tTlH6R9OTyptBs8dCenPlw==
ARC-Authentication-Results: i=1; rspamd-66f96cc86b-7crms;
 auth=pass smtp.auth=dreamhost smtp.mailfrom=list1@tompassin.net
X-Sender-Id: dreamhost|x-authsender|tpassin@tompassin.net
X-MC-Relay: Neutral
X-MailChannels-SenderId: dreamhost|x-authsender|tpassin@tompassin.net
X-MailChannels-Auth-Id: dreamhost
X-Spicy-Towering: 2a70fc015b0ef3a4_1744740741082_1036110108
X-MC-Loop-Signature: 1744740741082:1243455332
X-MC-Ingress-Time: 1744740741081
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tompassin.net;
 s=dreamhost; t=1744740740;
 bh=rC6533uGLB1CkntvHIJo+i/5WZ8D9bhw8ovsmzaGFP4=;
 h=Date:From:Subject:To:Content-Type:Content-Transfer-Encoding;
 b=1mojxGRaBkwvGnDyjgJ+dHIiI/pQSbRuknVPbdaraG1/Tz8AuZ2BOi9NQNF7+X9gJ
 CrZ5UU0+ei3BZ9/V5imC/O5Of3GJ5asEtzuwYLC7Ut5qb5Et6qC6kuk9SsSWiP8lLu
 qbGNGmr8dXNzCBIoAGBu/Jl1vZ3htD3BLgYY+JQcNy/tsh4C66hDeZ1pBU8jcZZtBb
 Y7MVjJZG4do7JDFf1HtlDfrAkWU2fco3uguqelABjddsyBxzqzDaowxzMIt0JJKBIt
 iEJ6I2OBVmZzJNBLe5oep0YUxxnuo7n7PIjMs8YFs83IIvgBooNiJS2RX+sPNCFVLa
 IO29+JzwyPzgg==
User-Agent: Mozilla Thunderbird
Content-Language: en-US
In-Reply-To: <CAN06=CxPNLHtr_sdgphR2jrN1V+WbB8wZDJdbvfEDb-MYtmPHA@mail.gmail.com>
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: <bbe32f47-13d2-459c-af22-4e0e37834091@tompassin.net>
X-Mailman-Original-References: <CAApdmf2J69WgkR159sBSkxN0=mYoNmHZYboBmpPi+LdA-YBNpg@mail.gmail.com>
 <CAN06=CxPNLHtr_sdgphR2jrN1V+WbB8wZDJdbvfEDb-MYtmPHA@mail.gmail.com>
Bytes: 7946

On 4/15/2025 12:43 PM, Friedrich Romstedt via Python-list wrote:
> Am Mo., 14. Apr. 2025 um 01:14 Uhr schrieb Jonathan Gossage via Python-list
> <python-list@python.org>:
> 
>> I am using *Python 3.13* in a virtual environment under *Ubuntu Linux
>> 24.04*
>> .
>> [...]
> 
> 
> 
>> Instead, it was
>> installed into the site-packages directory in
>> */home/jonathan/.locals/lib/python3.13/site-packages* even though I did not
>> specify *--user* to the *pip install* command. Is this expected behavior? I
>> wanted Sphinx to be installed in the virtual environment so that it would
>> be accessible to all users of the virtual environment.
> 
> 
> Hi Jonathan,
> 
> Many people put emphasis on that you need to *activate* a virtualenv before
> using it, but no-one so far stressed the fact that you got Sphinx installed
> to ~/jonathan/.local/lib/python3.13/site-packages *without using *--user.

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'm not sure if the restriction 
will be in place given that the OP built his own Python version.

> Do you have, by any chance, one of the following pip-related configuration
> files present?
> 
>     - /etc/pip.conf
>     - ~/.config/pip/pip.conf
>     - ~/.pip/pip.conf (lagacy)
> 
> I took this list from https://pip.pypa.io/en/stable/topics/configuration/.
> *If* there is any such file present, you might look out for a line:
> 
> user = true
> 
> but I am not entirely certain about this.
> 
> Looking forward to your reply!
> 
> Best,
> Friedrich