Re: Pip installs to unexpected place

rbowman <[email protected]>
Newsgroups comp.lang.python
Message-ID <[email protected]>
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.

The 'activate' script starts with

# This file must be used with "source bin/activate" *from bash*
# You cannot run it directly

The csh and fish variants have similar warnings. I don't have a Windows 
box up at the moment but iirc  activate.bat or Activate.ps1 is in the 
Scripts subdirectory and you do run it directly. On Linux the python in 
bin is usually a symlink, although you can specify it to be copied with a 
parameter to venv.  Symlinks on Windows are problematic but the process is 
more or less the same.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.