Graham Eddy <
g...@geddy.au> writes:
> use ‘python3 -m venv ~/venv’ to create the environment in ~/venv.
> then in your shell run ’source ~/venv/bin/activate’ to set up the shell environment (initialised python bindary, PYTHONPATH etc). i put this in my ~/.bashrc
>
> a key trick is that running the initialised python binary (~/venv/bin/python3) on its own sucks in the environment - really, really handy in systemctl unit files
> ⊣GE⊢
I have never activated a venv and always been puzzled by this being the
standard approach. Simply running the venv' python binary, either
explicitly on the command line, or via a #!, has been entirely fine. I
have home assistant working this way, which is super comlicated compared
to weewx.
I also run, when in the venv dir
bin/pip install foo
which runs the venv's pip which uses the venv's python.
I'm glad to hear that there is no special 'have to activate' rule about
weewx.