im making a game and due to how im making it i DONT want to turn it into an exe
how can i make python auto install
this is my current code using a windows batch file:
@echo off
REM Check for Python installation
python --version >nul 2>&1
IF %ERRORLEVEL% NEQ 0 (
echo Python is not installed. Installing now...
REM Set the URL for the latest Python installer (Python 3.12.0)
SET "python_installer_url=https://www.python.org/ftp/python/3.13.5/python-3.13.5-amd64.exe"
SET "installer_path=%TEMP%\python-installer.exe"
REM Download Python installer using PowerShell
powershell -Command "Invoke-WebRequest -Uri '%python_installer_url%' -OutFile '%installer_path%'"
REM Run the installer
start /wait "%installer_path%" /quiet InstallAllUsers=1 PrependPath=1
REM Clean up
del "%installer_path%"
) ELSE (
echo Python is already installed. please wait
)
REM Launch your game
python main.py
