I try to run a python script at start of raspberry pi. In the python script I use open cv
so I need to call before:
source ~/.profile
workon cv
I try to write a bash file:
#!/bin/bash
echo "Bash script"
source ~/.profile
workon cv
#/usr/bin/python3 reco_eyes_from_video.py
python reco_eyes_from_video.py
But I get this error:
Traceback (most recent call last):
File "reco_eyes_from_video.py", line 1, in <module>
import cv2
ImportError: No module named 'cv2'
If I call myself:
source ~/.profile
workon cv
and then:
python reco_eyes_from_video.py
it is working fine
There is any way to run workon
at the start?