Skip to content

Commit

Permalink
Merge pull request #13 from Syntist/fix-for-windows-python-installer
Browse files Browse the repository at this point in the history
Fix for windows python installer
  • Loading branch information
Prof-S authored Nov 26, 2024
2 parents b107033 + 64c49d1 commit 183ecc0
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,19 +156,22 @@ def main():
try:
if os.system(python_check_command) == 0:
print("Python 3.10 Installed")
if not venv_path.exists():
venv.create(venv_path, with_pip=True)
else:
print("Virtual environment already exists.")


if(platform.system() == "Windows"):
if not venv_path.exists():
run_command(f"py -3.10 -m venv {venv_path}")
else:
print("Virtual environment already exists.")

python_bin = venv_path / "Scripts/python.exe"

else:
raise Exception("Python not found")
except Exception:
if platform.system() == "Windows":
print("Python 3.10 not found. Please install it from https://github.com/adang1345/PythonWindows/blob/master/3.10.14/python-3.10.14-amd64-full.exe")
input('Press any key to exit...')
exit()
else:
# Linux/macOS installation steps
python_tar = download_file("https://www.python.org/ftp/python/3.10.14/Python-3.10.14.tgz", python_dir)
Expand Down

0 comments on commit 183ecc0

Please sign in to comment.