Sujet : Re: Pip installs to unexpected place
De : bowman (at) *nospam* montana.com (rbowman)
Groupes : comp.lang.pythonDate : 15. Apr 2025, 02:12:50
Autres entêtes
Message-ID : <m65q4iF7lsgU1@mid.individual.net>
References : 1 2 3 4 5 6
User-Agent : Pan/0.160 (Toresk; )
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.