+ 1
What do people do by running this code? , pls explain me.
import subprocess,sys def install(package): subprocess.call([sys.executable, "-m","pip","--disable-pip-version-chec","-q", "install", package])
7 Réponses
+ 1
they are running commands on the remote server.
its a souped up version of the regular
"pip install <package>"
All the other flags just tell the terminal not to throw the pip warnings because its not updated on the sololearn server.
All so they can install 3rd party modules
+ 1
So these commands are not so important?
+ 1
They arent needed. For example in my code here. But look all the way at the bottom of the output once you run it.
https://code.sololearn.com/c4TvNiOjl3ST/?ref=app
+ 1
But your code says something like new pip version 2. Something is there
+ 1
exactly, its just a warning, but its not too appealing to the eyes, so some people add the extra flags to hide the warning. I really dont care that much haha
+ 1
Thanks for explaining
+ 1
No problem at all