Deutsch English Français Italiano |
<mailman.7.1744741898.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: Mats Wichmann <mats@wichmann.us> Newsgroups: comp.lang.python Subject: Re: Pip installs to unexpected place Date: Tue, 15 Apr 2025 12:31:34 -0600 Lines: 31 Message-ID: <mailman.7.1744741898.3008.python-list@python.org> References: <CAApdmf2J69WgkR159sBSkxN0=mYoNmHZYboBmpPi+LdA-YBNpg@mail.gmail.com> <CAN06=CxPNLHtr_sdgphR2jrN1V+WbB8wZDJdbvfEDb-MYtmPHA@mail.gmail.com> <818a0fcd-72c8-4fbb-8ee4-4553f4f88f75@wichmann.us> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de VD7GziYE545nxWbv253/IgxpGho1HKgmmXRB9vWDOxmw== Cancel-Lock: sha1:CDf2XikwaRVsq8Xsc7tTDuEmyYs= sha256:Ger3d4Od9k4nxnFXeuaPw3Lyvd7xp3c69fCoAKSn/DM= Return-Path: <mats@wichmann.us> 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=messagingengine.com header.i=@messagingengine.com header.b=YQAIDd1a; dkim-adsp=none (unprotected policy); dkim-atps=neutral X-Spam-Status: OK 0.078 X-Spam-Evidence: '*H*': 0.84; '*S*': 0.00; 'pip': 0.04; 'python.': 0.08; 'bin': 0.09; 'pip.': 0.09; 'meanwhile': 0.16; 'pip,': 0.16; 'received:10.202': 0.16; 'received:10.202.2': 0.16; 'received:internal': 0.16; 'received:messagingengine.com': 0.16; 'virtualenv': 0.16; 'wrote:': 0.16; 'python': 0.16; 'to:addr :python-list': 0.20; 'install': 0.23; 'command': 0.23; 'installed': 0.23; '(and': 0.25; 'saying': 0.25; 'behavior': 0.26; 'visual': 0.26; 'fact': 0.28; 'it,': 0.29; 'header:User-Agent:1': 0.30; 'default': 0.31; 'python-list': 0.32; 'but': 0.32; 'path': 0.33; 'header:In-Reply-To:1': 0.34; 'people': 0.36; 'those': 0.36; '...': 0.37; 'using': 0.37; "it's": 0.37; 'directory': 0.37; 'way': 0.38; 'means': 0.38; 'put': 0.38; 'use': 0.39; "that's": 0.39; 'prompt': 0.39; 'try': 0.40; 'in,': 0.60; 'including': 0.60; 'gives': 0.62; 'everything': 0.63; 'your': 0.64; 'named': 0.65; 'figures': 0.69; 'latter': 0.69; 'skip:/ 30': 0.69; 'finds': 0.76; 'location.': 0.84; 'stressed': 0.84; 'unsafe': 0.84; 'activate': 0.91; 'received:103': 0.91; 'former': 0.93 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wichmann.us; h= cc:content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=2018-07.pbsmtp; t= 1744741895; x=1744828295; bh=mh/bZZ8DPDDRvata2gAPHIoqY8mQizPOhWT jxPPQBQ0=; b=Xfu4QxgwVLsgJo+KdlaetB6VkYBOkqp764K0qQf/TJrbNJ6OUUr BCXjapw4tnBzdlqRuZijGXPWa6Bfnw4BvSlDBzc+d24+BoOfqvwKbjbaPJ6ONrrg 3MnYrBZ8yHuFSyNYQe2oc2dTKzAgwEFYCSecHuqtz0PDLoSVrq5iR7/o= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; t=1744741895; x=1744828295; bh=m h/bZZ8DPDDRvata2gAPHIoqY8mQizPOhWTjxPPQBQ0=; b=YQAIDd1aT2h2ucK5f 7rfNetqkAmRNrcqrdaKoyWICDv8PVezG6Qf+XDAppdTc8lzk9cgwKRELv3CbRtSr IuUkw+L9fMlC8POeXIf5ftT9x58uaDP6CA3V77V/kd09MPSYGgNHR8uRVgxsrT+B ddAPK2eSt/DYtNXw9afFLULUwcFKhbbUiyIsa2D0A/8vF1LflonWGGxC7m03cXbp baOFXP8M9MOvO5fBchnxmpdOFlLJJizjQif3JIKGjyDo3TVOmrNOPaaXZ9hACGqS pfbniPVkjsBuPOdixDxHQY7Q+AVq/oxlF1BrHJ8aRLJMqyemngDU8T6uqt+uGQr2 lsUug== X-ME-Sender: <xms:B6b-Z7Ss-yGcvz8-93h7KyzlGlNi_Y-zkBPt6uotvr_nbXhk1RtnnQ> <xme:B6b-Z8xcOCtcZSFf9WHjorb4XGZwYlCxfck4yWPlo5S-366v7NbSHmni8wFlZPdee 25izahllfvaUquBmpc> X-ME-Received: <xmr:B6b-Zw0jz3VKDtDXKFTtRIvfrvWW9kRafmYYllDHzTaAP_i2_UeG7BTFZ1S2Nq3ugaWM1l-Om6FIt2PD0kSDonB0DZulRt8M6A> X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvvdegvddvucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpefkff ggfgfuvfhfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpeforghtshcuhghitghhmhgr nhhnuceomhgrthhsseifihgthhhmrghnnhdruhhsqeenucggtffrrghtthgvrhhnpeeiie fgieejheeuudegteekkeejfeefgedvudetteekieefffeitdekgeehkeekkeenucffohhm rghinhepjhhonhgrthhhrghnrdhlohgtrghlnecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepmhgrthhsseifihgthhhmrghnnhdruhhspdhnsggp rhgtphhtthhopedupdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehphihthhhonh dqlhhishhtsehphihthhhonhdrohhrgh X-ME-Proxy: <xmx:B6b-Z7AGjx2yrELZZ9gQ_jiytvE0niRm1e21ZjGJFsOCYIZrH_yLmw> <xmx:B6b-Z0i9axzP-zZmNIpXjEnTRIXY78YPWTC7iNsUBBWzpYWlxUdb_g> <xmx:B6b-Z_rjNFVxzHaYC1FZ98l5GF53ZNcxa-JMPpjUam789Sf7XDeTlQ> <xmx:B6b-Z_g-bTXYDS5lkY_6icL91HTNwXACh4Uygn7w1VOfLRAatNhlqw> <xmx:B6b-Z_WmPQXSNGkrSYEZ1jiZ7vSX3Kz431NMpVx3ogiq6j442OK9ocKh> Feedback-ID: i387144f0:Fastmail User-Agent: Mozilla Thunderbird Content-Language: en-US Autocrypt: addr=mats@wichmann.us; keydata= xsDiBD9xp6oRBAC1vd3YI8Gcr1CxpV1gldNQu0uQsNaICDk+Ai3+R163s/P83JOYG+SBEA3P v7iZx70qpQ3RzP7KrjF1Nm6j0em9ccUX2fPQUCAxXw5Hiq7CSMiwQQZRI6shcnyMh9XTKViT WK5MrKDyvjDEn7epjKzKwPS5SG039l6XaOKU0A4uGwCgsNqUQqC0gMMcbKlJV8ql58iKmbMD /ii8FPQrXmyS/FnsPs7UddV5qMHKm7NUH5oiKuMVyakInRyq9iIxuu3D4Ec6mWRKcGsjmIkW HXCSz0aefs6dsqNqpU54cYioJ3wP5LzHK7oclgJPryVt5Qezbdutf8SQf8gVkaNIlkxwGUzi bKTZ6CHzwlz9nNgeel0XPUcZzFxGA/4paeCg2rMSVuAhUQbsLYHu4XzTs9P16zaXkrtxc4m5 b+BF5xsLgTpyO5l859XudS2Gp+7/Y37dAU4QlyGGOboWmF1y9U5DnzBwG8ghsnym+ga58MJh LdRdQQ6xQolCpEXOuzm40f2r5uMxF3KOJ7WpIPuGAkeCPru9BmlATH+zOs0gTWF0cyBXaWNo bWFubiA8bWF0c0B3aWNobWFubi51cz7CYQQTEQIAIQIbAwYLCQgHAwIDFQIDAxYCAQIeAQIX gAUCT0VyZwIZAQAKCRDAMaCQc9hUxiZBAJ9cWziGp7hVfsu5T+cQptc3rLNndQCgrZh8u5LW BfJ5e/Y+3PwZ8UEm+ELOwE0EP5is8BAEAMtwzcA8TYf5UTjDMgwcSNoErTc9ag+IX05QFgL8 aF8sfJRv5atcitqQy0gSIsOzI+L/AFdPN/+QQI3dL1tCq14t32KPDtigDhzm6jVPXX5z+V9u xnD8XTp+ZvNcWoHXjViM8aXeLLEiCpiVCho307h3XShvqoKINWRQWeAsKKDDAAMFA/48zaey wiiEyvI0meJ1KkNHxdLP0yLODr1WV6j9xkPkLWOaIDw7dlwEOlF1N1YtZ2wa0p1wsttdIbIx ffgwXmcH4zrdxUIMz3U0BqYzk5H+5cYFXECXTFVOmweS+JECYMj80PjRoKCO1eVO1N30zksB 36NnhZWPRWIhjK3ZarIYH8JGBBgRAgAGBQI/mKzwAAoJEMAxoJBz2FTG6VEAoKDYHfDp5Q3q PuPvPahCE9HsXMgAAJ9INTqcLSJrOfyJ8q95nBO1T26H2Q== 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: <818a0fcd-72c8-4fbb-8ee4-4553f4f88f75@wichmann.us> X-Mailman-Original-References: <CAApdmf2J69WgkR159sBSkxN0=mYoNmHZYboBmpPi+LdA-YBNpg@mail.gmail.com> <CAN06=CxPNLHtr_sdgphR2jrN1V+WbB8wZDJdbvfEDb-MYtmPHA@mail.gmail.com> On 4/15/25 10:43, Friedrich Romstedt via Python-list wrote: > 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. To be clear: you do not have to activate a virtualenv to use *Python* from it. If you just call the python by the path it's in, it figures everything out (and sets some variables you can query vi sysconfig if you have reason to actually need those details (look for installation schemes). What activating gives you is some path fiddling, and some prompt fiddling (although the prompt fiddling keeps saying it's deprecated). The latter is a visual clue; the former means you can also find *other* commands installed in the virtualenv - including pip. /path/to/virtualenv//bin/python -m pip install ... will work whether you activated or not. pip install ... finds the first command in your PATH named pip, which may or may not be the one in the virtualenv, *unless* you've activated it, because that's the only way the virtualenv bin directory ends up early in your path. Meanwhile - the install to ~/.local : some distros just default to that behavior whether you ask for it or not, because they consider it unsafe to install in the system location. Some have chosen to yell at you even if you try a "user install" with the system Python. Up to them what they do...