+ 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])

3rd Oct 2020, 3:14 PM
Gama_bomb_v2.0
Gama_bomb_v2.0 - avatar
7 Answers
+ 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
3rd Oct 2020, 3:31 PM
Slick
Slick - avatar
+ 1
So these commands are not so important?
3rd Oct 2020, 3:36 PM
Gama_bomb_v2.0
Gama_bomb_v2.0 - avatar
+ 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
3rd Oct 2020, 3:37 PM
Slick
Slick - avatar
+ 1
But your code says something like new pip version 2. Something is there
3rd Oct 2020, 3:45 PM
Gama_bomb_v2.0
Gama_bomb_v2.0 - avatar
+ 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
3rd Oct 2020, 3:47 PM
Slick
Slick - avatar
+ 1
Thanks for explaining
3rd Oct 2020, 3:48 PM
Gama_bomb_v2.0
Gama_bomb_v2.0 - avatar
+ 1
No problem at all
3rd Oct 2020, 3:48 PM
Slick
Slick - avatar