According to this answer you can import pip from within a Python script and use it to install a module. Is it possible to do this with conda install?
conda install
The co
The simpler thing that i tried and worked for me was :
import os try: import graphviz except: print ("graphviz not found, Installing graphviz ") os.system("conda install -c anaconda graphviz") import graphviz
And make sure you run your script as admin.