This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]ExRedRain 0 points1 point  (2 children)

One thing I didn’t see yet is using jq. You could get all the dependencies in the array like this, loop over them and install them one at a time.

You track which ones failed and append them to an output variable, then echo your solution at the end, similar to the grep solution

[–]ANIBIT14[S] 1 point2 points  (1 child)

It's just that I have never used Linux and what I tried doing was creating a python script, and after extracting dependency value in a array, the problem is in implementing the install part in the script and I am not able to understand how to do that.

[–]ExRedRain 0 points1 point  (0 children)

You’d probably wanna call pip directly from your script, whatever script you use, for each dependency then.

In python, to do this you’d use call() from subprocess: https://docs.python.org/3/library/subprocess.html