Add files via upload

main
jackfood 1 year ago committed by GitHub
parent 3996d1f9c4
commit d33d26486f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,20 @@
import subprocess
import os
# Read the package name from ~pip.txt
with open("pip.txt", "r") as file:
package_name = file.read().strip()
# Define the package(s) you want to install
packages_to_install = [package_name]
# Loop through the list of packages and install them one by one
for package in packages_to_install:
try:
# Use subprocess to run the pip install command
subprocess.run(["pip", "install", package], check=True)
print(f"Successfully installed {package}")
except subprocess.CalledProcessError as e:
print(f"Failed to install {package}: {e}")
os.remove("pip.txt")
Loading…
Cancel
Save