I recently installed opencv but before I run the python script i always have to run these two commands:
workon cv
source ~/.profile
I already tried running the commands at boot, here's my '/etc/rc.local':
#!/bin/sh -e
IP=$(hostname -I) || true
if [ "$_IP" ]; then
printf "My IP address is %s\n" "$_IP"
fi
/home/pi/boot.sh
# boot.sh contains those two commands
exit 0
but it didn't work.
I even tried using crontab -e
, but that too didn't work
Is there any other way by which i can avoid typing those commands in future?