Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: rbowman Newsgroups: comp.lang.python Subject: Re: Pip installs to unexpected place Date: 15 Apr 2025 01:12:50 GMT Lines: 23 Message-ID: References: <020e0ef5-3d53-4f9c-acb5-842a1a971b10@tompassin.net> <45c52b56-eb57-4d54-9f91-bee30280d16f@tompassin.net> <87lds22xnm.fsf@nosuchdomain.example.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: individual.net DicKiF+m85+/D38SyEe51waQatvZm9CMzYfBYKB1lOln5ccg9n Cancel-Lock: sha1:9aBtavSNqt3JziIoqvzA00cA5WE= sha256:+FLsDgVW/g60bctxgB7hyCsaFLFAJ/B8FOCOb7goTwU= User-Agent: Pan/0.160 (Toresk; ) Xref: csiph.com comp.lang.python:197395 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.