Checking Your Python Version¶
This guide will help you verify that you have Python 3.9 or higher installed on your system, which is required to run the CS4341 referee system.
Command Line Method¶
-
Open your terminal (Command Prompt on Windows, Terminal on macOS/Linux)
-
Run one of these commands:
python --version # or python3 --version -
You should see output like:
Make sure the version number is 3.10.0 or higher.Python 3.10.8
Checking in Python¶
You can also check your version from within Python:
-
Open Python in interactive mode:
python # or python3 -
Run this code:
import sys print(sys.version) -
You'll see detailed version information like:
3.10.8 (main, Oct 13 2022, 10:17:43) [Clang 14.0.0 (clang-1400.0.29.102)]
Installing or Updating Python¶
If you don't have Python 3.9+ installed:
Windows¶
- Visit the Python Downloads page
- Download the latest Python 3 installer
- Run the installer, making sure to check "Add Python to PATH"
macOS¶
Using Homebrew:
brew install python@3.12
Linux (Ubuntu/Debian)¶
sudo apt update
sudo apt install python3.12
Multiple Python Versions¶
If you have multiple Python versions installed:
-
You can specify the version explicitly:
python3.9 --version python3.10 --version -
Consider using virtual environments to manage different Python versions:
# Create a virtual environment with specific Python version python3.10 -m venv myenv # Activate it source myenv/bin/activate # On Unix/macOS myenv\Scripts\activate # On Windows
Troubleshooting¶
If you see an error like "python not found" or get a version lower than 3.10:
- Make sure Python is properly installed
- Check if Python is added to your system's PATH
- Try using
python3instead ofpython - On Windows, try using
py -3orpy -3.10
For additional help, consult the Python Installation Guide or contact the course staff.