Feb-05-2021, 04:33 PM
Feb-05-2021, 08:04 PM
I have found this code earlier to do so (not my work though, but it worked for me)
import subprocess import sys def install(package): subprocess.check_call( [sys.executable, "-m", "pip", "install", package]) install('pandas')So in your case your exception should include the code within the code in my install function. In this case 'pandas' is an example ofcourse.