Quantcast
Viewing all articles
Browse latest Browse all 4854

Python • Re: DS18B20 / w1thermsensor

I initially created the venv by this command from the home/pi/Documents/HVAC directory.

Code:

python3 -m venv env 
And it could be activated from the command line by:

Code:

 env/bin/activate

or this:

Code:

./env/bin/activate
No this way Nothing is activated : you should type (or put into a bash script)
either

Code:

 . env/bin/activate 
or (" " source " is easier to read "." _dot_ is very tiny)

Code:

 source env/bin/activate 
This is confirmed by the very first three lines of activate

Code:

pi@raspberrypi:~ $ cat selenium/bin/activate# This file must be used with "source bin/activate" *from bash*# you cannot run it directly
A "classical" shell script uses variable (like python) and, at the end of the script, these variable s DISAPPEAR (else, that would be very messy).
If you want to keep variables -such as pythons version, the libraries places : seems it is what you need- , the only way is to use SOURCE -or ., but one cannot read it-

Statistics: Posted by dbrion1 — Mon Aug 05, 2024 4:21 pm



Viewing all articles
Browse latest Browse all 4854

Trending Articles