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?
Use os.system
to do that. You use say os.system(“your command”)
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
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.