I am working on a Python program which will be distributed to our clients.
Their requirement is that the program should take care of everything without their manual intervention.
How do I check and install missing modules in Python at the time of executing the code? In R, I can use the code as provided below.
How do I replicate something similar in Python?
# Check and install missing packages in R
list.of.packages <- c("RDCOMClient", "htmlTable")
new.packages <- list.of.packages[!(list.of.packages %in% installed.packages()[,"Package"])]
if(length(new.packages) > 0) {
install.packages(new.packages)
}