In Python, I could do os.system("pip install bs4")
. Is there any equivalent in Rust? I've seen std::process::Command
, but this seems to fail each time:
use std::process::Command;
Command::new("pip")
.arg("install")
.arg("bs4")
.spawn()
.expect("pip failed");
Is there any way to have the code execute a real shell and have them run in the terminal?