TermPY/packages/pip.py

21 lines
478 B
Python
Raw Normal View History

#["pip", "packages.pip", ["pip"]]
# Made By Blurple
import os, sys
def pip(command: list):
2023-08-27 02:41:15 +00:00
#print(command, len(command))
if len(command) != 1:
print("comand requires [ package_name ] [ args (optional) ] ")
return
package = command[0]
try:
2023-08-27 02:41:15 +00:00
print("Running pip from shell")
os.system(f"python -m pip install {package}")
except Exception as e:
print(e)
except:
2023-08-27 02:52:17 +00:00
print("cannot download")