Re: Pip installs to unexpected place

2025-04-21 Thread rbowman via Python-list
On Sat, 19 Apr 2025 15:56:16 -0400, Thomas Passin wrote: > My problem with venvs, especially if I have more than one, is that I > eventually forget what they were for and what is different about each > one. If there's only one and it's used for all non-system work, that's > OK but beyond that and

Re: Pip installs to unexpected place

2025-04-21 Thread songbird via Python-list
Peter J. Holzer wrote: > On 2025-04-18 13:08:36 -0400, Thomas Passin via Python-list wrote: ... >> When the system launches its application the PYTHONPATH will start with >> system site directories; local user site directories will be on the >> PYTHONPATH but since they come later, the python will

Re: Pip installs to unexpected place

2025-04-19 Thread Thomas Passin via Python-list
On 4/19/2025 4:56 AM, Peter J. Holzer via Python-list wrote: On 2025-04-18 13:08:36 -0400, Thomas Passin via Python-list wrote: On 4/18/2025 11:38 AM, Peter J. Holzer via Python-list wrote: On 2025-04-18 13:24:28 +1200, Greg Ewing via Python-list wrote: On 18/04/25 9:41 am, Mats Wichmann wrote

Re: Pip installs to unexpected place

2025-04-19 Thread Peter J. Holzer via Python-list
On 2025-04-18 13:08:36 -0400, Thomas Passin via Python-list wrote: > On 4/18/2025 11:38 AM, Peter J. Holzer via Python-list wrote: > > On 2025-04-18 13:24:28 +1200, Greg Ewing via Python-list wrote: > > > On 18/04/25 9:41 am, Mats Wichmann wrote: > > > > There's just not a really great answer to th

Re: Pip installs to unexpected place

2025-04-19 Thread Peter J. Holzer via Python-list
On 2025-04-18 17:11:33 +0100, Oscar Benjamin via Python-list wrote: > On Fri, 18 Apr 2025 at 16:50, Peter J. Holzer via Python-list > wrote: > > > > On 2025-04-18 13:24:28 +1200, Greg Ewing via Python-list wrote: > > > On 18/04/25 9:41 am, Mats Wichmann wrote: > > > > There's just not a really gre

Re: Pip installs to unexpected place

2025-04-18 Thread Thomas Passin via Python-list
On 4/18/2025 11:38 AM, Peter J. Holzer via Python-list wrote: On 2025-04-18 13:24:28 +1200, Greg Ewing via Python-list wrote: On 18/04/25 9:41 am, Mats Wichmann wrote: There's just not a really great answer to this. Seems to me a system-installed application shouldn't be looking in the user's

Re: Pip installs to unexpected place

2025-04-18 Thread Oscar Benjamin via Python-list
On Fri, 18 Apr 2025 at 16:50, Peter J. Holzer via Python-list wrote: > > On 2025-04-18 13:24:28 +1200, Greg Ewing via Python-list wrote: > > On 18/04/25 9:41 am, Mats Wichmann wrote: > > > There's just not a really great answer to this. > > > > Seems to me a system-installed application shouldn't

Re: Pip installs to unexpected place

2025-04-18 Thread Peter J. Holzer via Python-list
On 2025-04-18 13:24:28 +1200, Greg Ewing via Python-list wrote: > On 18/04/25 9:41 am, Mats Wichmann wrote: > > There's just not a really great answer to this. > > Seems to me a system-installed application shouldn't be looking in the > user's .local packages in the first place. That should only b

Re: Pip installs to unexpected place

2025-04-17 Thread Greg Ewing via Python-list
On 18/04/25 9:41 am, Mats Wichmann wrote: There's just not a really great answer to this. Seems to me a system-installed application shouldn't be looking in the user's .local packages in the first place. That should only be for things the user has installed "for this user". -- Greg -- https

Re: Pip installs to unexpected place

2025-04-17 Thread Mats Wichmann via Python-list
On 4/17/25 15:15, Grant Edwards via Python-list wrote: On 2025-04-17, Left Right via Python-list wrote: 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"?

Re: Pip installs to unexpected place

2025-04-17 Thread Grant Edwards via Python-list
On 2025-04-17, Left Right via Python-list wrote: >> 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"? > > pip installs dependencies. Dependencies may di

Re: Pip installs to unexpected place

2025-04-17 Thread Left Right via Python-list
> 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"? pip installs dependencies. Dependencies may disagree on the version with the system packages. This is

Re: Pip installs to unexpected place

2025-04-17 Thread Thomas Passin via Python-list
On 4/17/2025 4:58 AM, Roel Schroeven via Python-list wrote: Op 15/04/2025 om 20:31 schreef Mats Wichmann via Python-list: 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 vari

Re: Pip installs to unexpected place

2025-04-17 Thread Roel Schroeven via Python-list
Op 15/04/2025 om 20:31 schreef Mats Wichmann via Python-list: 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 actua

Re: Pip installs to unexpected place

2025-04-16 Thread Thomas Passin via Python-list
On 4/15/2025 5:38 PM, rbowman via Python-list wrote: On Tue, 15 Apr 2025 14:12:19 -0400, Thomas Passin 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 sayi

Re: Pip installs to unexpected place

2025-04-16 Thread rbowman via Python-list
On Tue, 15 Apr 2025 14:12:19 -0400, Thomas Passin 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 P

Re: Pip installs to unexpected place

2025-04-16 Thread Grant Edwards via Python-list
On 2025-04-16, Mats Wichmann via Python-list wrote: > On 4/15/25 16:07, Grant Edwards via Python-list wrote: >> On 2025-04-15, Thomas Passin via Python-list 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 admi

Re: Pip installs to unexpected place

2025-04-15 Thread Mats Wichmann via Python-list
On 4/15/25 16:07, Grant Edwards via Python-list wrote: On 2025-04-15, Thomas Passin via Python-list 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

Re: Pip installs to unexpected place

2025-04-15 Thread Grant Edwards via Python-list
On 2025-04-15, Thomas Passin via Python-list 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 Pi

Re: Pip installs to unexpected place

2025-04-15 Thread rbowman via Python-list
On Tue, 15 Apr 2025 18:43:43 +0200, Friedrich Romstedt 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. T

Re: Pip installs to unexpected place

2025-04-15 Thread Thomas Passin via Python-list
On 4/15/2025 3:41 PM, dn via Python-list wrote: Various responses have been provided but the OP has not yet replied on- list (as verified by Archive). Is this an error with the list-processor or have some posts been sent to one person only (using Reply instead of ReplyList)? There are always

Re: Pip installs to unexpected place

2025-04-15 Thread Thomas Passin via Python-list
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 : 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

Re: Pip installs to unexpected place

2025-04-15 Thread dn via Python-list
Various responses have been provided but the OP has not yet replied on-list (as verified by Archive). Is this an error with the list-processor or have some posts been sent to one person only (using Reply instead of ReplyList)? There are always others who would like to learn from list-discussio

Re: Pip installs to unexpected place

2025-04-15 Thread Mats Wichmann via Python-list
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 clea

Re: Pip installs to unexpected place

2025-04-15 Thread Friedrich Romstedt via Python-list
Am Mo., 14. Apr. 2025 um 01:14 Uhr schrieb Jonathan Gossage via Python-list : > 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* ev

Re: Pip installs to unexpected place

2025-04-15 Thread rbowman via Python-list
On Mon, 14 Apr 2025 15:20:13 -0700, Keith Thompson wrote: > Making the active script executable introdues the risk that you'll > accidentally execute it rather than sourcing it. If you do that, it > will probably set up the environment in a new shell process which then > immediately terminates.

Re: Pip installs to unexpected place

2025-04-15 Thread Keith Thompson via Python-list
rbowman writes: > On Mon, 14 Apr 2025 09:55:09 -0400, Thomas Passin wrote: >> Pip doesn't know about the environment it runs in. It seems to me that >> you didn't active the venv before you installed using pip. So nothing >> would have gotten installed into the venv. So where is the venv that you

Re: Pip installs to unexpected place

2025-04-14 Thread Thomas Passin via Python-list
On 4/14/2025 6:20 PM, Keith Thompson via Python-list wrote: Thomas Passin writes: [...] To activate a venv, you have to source its activate script, which is in the venv. First you have to mark it as executable. Then you source it - source ~/venv/gf4/bin/activate [...] No, you don't have to

Re: Pip installs to unexpected place

2025-04-14 Thread Thomas Passin via Python-list
On 4/14/2025 6:20 PM, Keith Thompson via Python-list wrote: Thomas Passin writes: [...] To activate a venv, you have to source its activate script, which is in the venv. First you have to mark it as executable. Then you source it - source ~/venv/gf4/bin/activate [...] No, you don't have to

Re: Pip installs to unexpected place

2025-04-14 Thread rbowman via Python-list
On Mon, 14 Apr 2025 09:55:09 -0400, Thomas Passin wrote: > Pip doesn't know about the environment it runs in. It seems to me that > you didn't active the venv before you installed using pip. So nothing > would have gotten installed into the venv. So where is the venv that you > set up? I usually p

Re: Pip installs to unexpected place

2025-04-14 Thread Keith Thompson via Python-list
Thomas Passin writes: [...] > To activate a venv, you have to source its activate script, which is > in the venv. First you have to mark it as executable. Then you source > it - > > source ~/venv/gf4/bin/activate [...] No, you don't have to (and probably shouldn't) mark the script as executable.

Re: Pip installs to unexpected place

2025-04-14 Thread Thomas Passin via Python-list
Please include the group in your response; don't just send it to me. On 4/14/2025 5:09 AM, Jonathan Gossage wrote: The virtual environment was owned by the user running pip. It was not owned by root. Does pip not support virtual environments that are owned by a non-root user and have a multi-us

Re: Pip installs to unexpected place

2025-04-14 Thread rbowman via Python-list
On Sun, 13 Apr 2025 19:10:47 -0400, Jonathan Gossage wrote: > The version of Python was compiled from source code and installed with > make altinstall. I attempted to use *pip* to install the *Sphinx* > package into the virtual environment using the command *pip install > sphinx* in the virtual en

Re: Pip installs to unexpected place

2025-04-13 Thread dn via Python-list
On 14/04/25 11:10, Jonathan Gossage via Python-list wrote: I am using *Python 3.13* in a virtual environment under *Ubuntu Linux 24.04* . The version of Python was compiled from source code and installed with make altinstall. I attempted to use *pip* to install the *Sphinx* package into the virtu