0

Is there any way to use other python libraries in sololearn compiler?

Can we use python libraries that we install with pip command in sololearn code editor?

25th Jun 2021, 3:53 PM
Bhavik Mahalle
Bhavik Mahalle - avatar
3 Respostas
+ 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/
25th Jun 2021, 9:31 PM
Ervis Meta
Ervis Meta - avatar
+ 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.
25th Jun 2021, 9:36 PM
Ervis Meta
Ervis Meta - avatar
26th Jun 2021, 4:18 AM
AKSHAY🇮🇳
AKSHAY🇮🇳 - avatar