I want to automate process of installing dependencies on linux but whenever I run my commands nothing happens.
CODE:
commands_to_run = ["sudo apt-get update && sudo apt-get upgrade",
"sudo apt-get install build-essential cmake pkg-config",
"sudo apt-get install libjpeg-dev libtiff5-dev libjasper-dev libpng12-dev",
"sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libv4l-dev",
"sudo apt-get install libxvidcore-dev libx264-dev",
"sudo apt-get install libgtk2.0-dev libgtk-3-dev",
"sudo apt-get install libatlas-base-dev gfortran",
"sudo apt-get install python2.7-dev python3-dev"]
import subprocess
for command in commands_to_run:
subprocess.call(command, shell=True)
I tried many different options but nothing works. I refuse to believe that you can't automate dependency installation on Linux.
EDIT: It seems that it works but it doesn't do anything. When I want to run this again but through terminal it tells me that dependency is not installed and asks me if I want to install it (y/n).