Running the venv's binaries (versus activation) is completely acceptable.
Indeed, that's what the systemctl unit file does.

On Fri, Aug 25, 2023 at 3:27 AM Greg Troxel <g...@lexort.com> wrote:

> 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.
>
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "weewx-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to weewx-user+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/weewx-user/rmi1qfre7t2.fsf%40s1.lexort.com
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/CAPq0zEDPagn7x_3sTzXexEdWyGXozGNGJ2-xcV6G88FE9fRh7w%40mail.gmail.com.

Reply via email to