Sujet : Re: Pip installs to unexpected place
De : Keith.S.Thompson+u (at) *nospam* gmail.com (Keith Thompson)
Groupes : comp.lang.pythonDate : 14. Apr 2025, 23:20:13
Autres entêtes
Organisation : None to speak of
Message-ID : <87lds22xnm.fsf@nosuchdomain.example.com>
References : 1 2 3 4 5
User-Agent : Gnus/5.13 (Gnus v5.13)
Thomas Passin <
list1@tompassin.net> 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.
Making a script executable (chmod +x) is required before *executing* it,
but when you *source* a script (using "source" or "."), your current
shell reads it and evaluates its content.
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.
-- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.comvoid Void(void) { Void(); } /* The recursive call of the void */