I want to check if a module exists, if it doesn\'t I want to install it.
How should I do this?
So far I have this code which correctly prints f
f
You can use os.system as follows:
os.system
import os package = "package_name" try: __import__package except: os.system("pip install "+ package)