How to run cmd codes like pip install matplotlib in python?
I tried to use Stash, but it costs too much time and it cannot be run if I have a UIView. So, can someone help me?
CodePudding user response:
Use os.system to do that. You use say os.system(“your command”)
CodePudding user response:
Oh, I found how to do that! Use os.system(“pip install matplotlib”) to do that!
My code:
import os
os.system(“pip install matplotlib”)
:DDDD
Source: geeksforgeeks
