3 ответов
+ 1
You have a plenty of options :
1-) subprocess module -> call method
# import subprocess as sp
# sp.call(['pip','install','moduleName'])
2-) os module -> system method
# import os
# os.system('pip install moduleName')
or you ca see the documentation :
https://packaging.python.org/tutorials/installing-packages/
+ 2
But you can not use libraries that are specialized for graphics or terminal colors, so pygame, tkinter, kivy, blender, panda3d, ursina, termcolor, colorama ect; cannot be run properly on SoloLearn .
Anyway, for example : matplotlib plots can be shown with the .savefig() method of pyplot sub-package.
Other libraries can run successfully.