Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4151

Python • Re: DS18B20 / w1thermsensor

$
0
0
Please post the output of this:

Code:

#!/bin/bashcd /home/pi/Documents/HVAC/source ./env/bin/activatewhich python
I created a file memjr.sh containing the code you provided, and ran it with:

Code:

bash memjr.sh 
The result was: /home/pi/Documents/HVAC/env/bin/python
I also just entered the commands one-by-one at the CLI and got the identical result.
Also, I re read some of the stuff above and I am confused by this:
I had created the venv without copying over the main package distribution. So I recreated it doing that copy-over and then the install succeeded.
What does creating the venv with or without copy things? Copying what? To create a venv, there is not need to copy anything. You just issue the command to create the venv, activate it and then install packages in it with pip.

What was the command you used to create the venv?
By creating the venv with or without copying things I meant with or without --system-site-packages option.


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
After pip w1thermsensor, with the venv activated failed, I executed this with the venv deactivated:

Code:

python3  -m venv env --system-site-packages

Then, after activating the venv, the pip install worked.

Statistics: Posted by dlflannery — Thu Aug 01, 2024 9:08 pm



Viewing all articles
Browse latest Browse all 4151

Trending Articles