Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #197402
| From | Thomas Passin <list1@tompassin.net> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: Pip installs to unexpected place |
| Date | 2025-04-15 14:12 -0400 |
| Message-ID | <mailman.9.1744749213.3008.python-list@python.org> (permalink) |
| References | <CAApdmf2J69WgkR159sBSkxN0=mYoNmHZYboBmpPi+LdA-YBNpg@mail.gmail.com> <CAN06=CxPNLHtr_sdgphR2jrN1V+WbB8wZDJdbvfEDb-MYtmPHA@mail.gmail.com> <bbe32f47-13d2-459c-af22-4e0e37834091@tompassin.net> |
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
Back to comp.lang.python | Previous | Next — Next in thread | Find similar
Re: Pip installs to unexpected place Thomas Passin <list1@tompassin.net> - 2025-04-15 14:12 -0400
Re: Pip installs to unexpected place rbowman <bowman@montana.com> - 2025-04-15 21:38 +0000
Re: Pip installs to unexpected place Thomas Passin <list1@tompassin.net> - 2025-04-16 12:50 -0400
csiph-web