diff --git a/installpip.py b/installpip.py new file mode 100644 index 0000000..25d2fab --- /dev/null +++ b/installpip.py @@ -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") \ No newline at end of file