I actually was executing the pip with the venv activated. 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. It gave a warning that the package had been installed in /home/pi/.local/bin and I should add that to my $PATH., which I did."this environment is externally managed".means you are executing the command in a terminal with the venv not activated.
Strange (at least to this Linux noob) is that now my Python programs that use the sensor work WITHOUT having the venv activated. (???) It's like the venv was only needed for the install. Does that make sense?
I look in /home/pi/.local/bin and the only file there is: w1thermsensor, of type plain text, and here is what it contains:
Code:
#!/home/pi/Documents/HVAC/env/bin/python# -*- coding: utf-8 -*-import reimport sysfrom w1thermsensor.cli import cliif __name__ == '__main__': sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) sys.exit(cli())
Statistics: Posted by dlflannery — Wed Jul 31, 2024 6:56 pm