That was posted to address what was discussed in the two posts right before the one I made.I'm not sure the point you're trying to make here. I do have a working knowledge of sudo and what a python virtual environment is. The templated command you've suggested above does not address the issue for which I'm asking assistance. As I believe I detailed fairly clearly, the problem is that, although I have two scripts that work perfectly well when run separately, there's some conflict arising when the processes are brought together into a single script. This is not a problem caused by mistaken sudo commands or a misunderstanding of the python venv.It would behoove you to learn what sudo does, how it does it, why it does it, etc.
Likewise for python virtual environments.
sudo /full/path/to/project/venv/bin/python /full/path/to/project/myscript.py
If the packages need root/sudo, it does not matter where it is installed, it will need the access, period. But if it is installed in the venv, then using the full path to the venv's python interpreter removes that issue of it not being found id sudo is being used.
As for the original question, I did not read the entire code line by line, but I believe that if you pseudo code what you are trying to do, it will help you figure out what to copy from each script you already have into the correct places of your final script. If you do it bit by bit with testing in between, you should find the bit of code that causes the issue.
Statistics: Posted by memjr — Sun Aug 04, 2024 9:10 pm