+ 3

What's the problem?

What is the problem in the following code? I want to install a module but it's not working... Code: import subprocess,sys def install(package): subprocess.call([sys.executable, "-m","pip","--disable-pip-version-check","-q", "install", package]) install ('psutil') https://code.sololearn.com/cKy9O0oi77uK/?ref=app

27th Sep 2020, 7:58 AM
Hind Biswas
Hind Biswas - avatar
3 odpowiedzi
+ 6
https://github.com/giampaolo/psutil/issues/1143 Some pre-requisite is not installed on the SoloLearn server. It is best to limit your SL codes to those libraries that are already available. In a virtual instance where you have only a few seconds at your disposal, there is not much room for maneuverability. External libraries are better to test on your own machine, or on a platform that allows you to dynamically install libraries, like repl.it or heroku.
27th Sep 2020, 8:24 AM
Tibor Santa
Tibor Santa - avatar
+ 2
I think the problem in sololean console (maybe it doesn't support psutil requirements)
27th Sep 2020, 8:24 AM
Sousou
Sousou - avatar
0
Namit Jain AKM Can you help?
27th Sep 2020, 8:19 AM
Hind Biswas
Hind Biswas - avatar