use this bash script


#!/bin/bash

# 1. Define names
VENV_PATH=".venv"
SCRIPT_NAME="hello.py"

echo "--- Setting up the environment ---"
# 2. Create the virtual environment
python -m venv $VENV_PATH

# 3. Create a simple Hello World Python script
echo "print('Hello from your new Python virtual environment!')" > $SCRIPT_NAME
echo "Created $SCRIPT_NAME"

echo "--- Running the script ---"
# 4. Run the script using the python.exe inside the venv
# (This works on Windows without needing to 'activate' the session first)
./$VENV_PATH/Scripts/python.exe $SCRIPT_NAME

echo "--------------------------"
echo "Done! To work in this environment manually, run: source $VENV_PATH/Scripts/activate"