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

Python • Booting into a venv

$
0
0
hi,
im in the making of a school project which uses opencv to react to people
i have my code working however it requires being ran from a venv, and i am struggling to have have it enter the venv and run the code from boot.
any help would be much appreciated (and quickly too im on a VERY tight deadline)

ive tried using a sh file that is ran through crontab

Code:

#!/bin/bash# source startup.shcd /homecd /home/din/yolo &&source /home/din/yolo/venv/bin/activate &&python /home/din/yolo/ds.py
and trying to run it directly through crontab by using

Code:

/home/din/yolo/venv/bin/python
i am very much a newbie and thought it would be smooth sailing after i got the main code working but here we are =(

Statistics: Posted by ZiDin — Mon May 19, 2025 7:46 am



Viewing all articles
Browse latest Browse all 1585

Trending Articles