+ 4
Can I use pip to install packages in Sololearn? Modules are not available.
7 Respuestas
+ 12
You can use the following script to install module in sololearn,
import subprocess
import sys
def install(package):
subprocess.check_call([
sys.executable, "-m", "pip","-q", "install", package
])
subprocess.check_call([sys.executable,"-m","pip","-q","install","--upgrade","pip"])
install(module name)
+ 2
#You can use that way or use:
import os
os.system('pip install module_name')
+ 1
Thank you
+ 1
import subprocess
import sys
def install(package):
subprocess.call([sys.executable, "-m", "pip", "-q", "install", package])
#pass the module you want installed as a string and then import! (No GUI support)
install('Desired package')
0
Is this how
0
I'll try