Skip to main content
US Army Corps of EngineersInstitute for Water Resources, Risk Management Center

Installing Python

Python is the primary scripting and development language used across many RMC projects for data analysis, automation, scientific computing, and tool development. This section covers how to install Python on your machine and ensure it is properly configured.


Choosing a Python Version

Python releases follow a major.minor.micro versioning scheme (e.g., Python 3.13.2). When selecting a version:

  • Use Python 3.10 or later for RMC development work. Older versions are missing important language features and library support.
  • Avoid the very latest release. Some scientific packages take time to release compatible builds for brand-new Python versions. Choosing a version that has been out for at least several months gives the package ecosystem time to catch up.
  • Match your team's version if you are joining an existing project. Check the project's documentation or requirements.txt for version guidance.

Python Release History

Each Python version follows a roughly 5-year support lifecycle: approximately 2 years of active bug-fix support (with binary installers), followed by approximately 3 years of security-only patches (source-only releases), then end-of-life.

VersionInitial ReleaseStatusEnd-of-Life
Python 3.9October 2020End-of-lifeOctober 2025
Python 3.10October 2021Security fixes onlyOctober 2026
Python 3.11October 2022Security fixes onlyOctober 2027
Python 3.12October 2023Security fixes onlyOctober 2028
Python 3.13October 2024Active (bug fix)October 2029
Python 3.14October 2025Active (bug fix)October 2030

For the most current release information, see the official Python Release Schedule.

Python 2 vs. Python 3

Python 2 reached end-of-life in January 2020 and should never be used for new development. All instructions in this guide are for Python 3.


Installing Python

Python is available for request through the USACE App Portal.

To install Python:

  1. Open the USACE App Portal
  2. Search for Python and request the available version
  3. Installation should occur automatically. If installation doesn't begin within 48 hours, contact the Enterprise Service Desk at (866) 562-2348.
App Portal Version

The Python versions available through the App Portal may vary and do not always include every release. Before installing, verify with your team lead that the available version is appropriate for the work you will be performing.


Adding Python to PATH

If Python is not automatically added to your PATH during installation (or if python --version fails after installation), you will need to add it manually.

PATH is an environment variable that tells your operating system where to find executable programs. Without Python on your PATH, you would need to type the full file path to python.exe every time you run a command.

To add Python to your user PATH:

  1. Open the Windows Start Menu and type environment variables into the Search Bar
  2. Click on Edit environment variables for your account
danger

DO NOT click Edit the system environment variables. System environment variables apply to all users on the machine and require administrator privileges to modify. On USACE computers, you will not have access to this option. Even on machines where you do have administrator rights, modifying user variables is preferred — it keeps your changes scoped to your account and avoids unintended side effects for other users.

Windows Search showing Edit environment variables for your account under Settings
  1. In the Environment Variables window, select Path under User variables and click Edit...
Environment Variables window with Path selected under User variables and the Edit button highlighted. The System variables section is grayed out with a warning not to edit system variables.
  1. Click New and add the path to your Python installation folder (the folder containing python.exe). For example:
    C:\Users\<username>\AppData\Local\Programs\Python\Python312\
  2. Click New again and add the Scripts subfolder (this is where pip and other tools are installed):
    C:\Users\<username>\AppData\Local\Programs\Python\Python312\Scripts\
  3. Click OK to close all environment variable windows
Edit environment variable window showing Python paths added to the user PATH list, with the New and OK buttons highlighted
tip

Restart any open terminal windows after modifying PATH. Changes to environment variables do not take effect in terminals that were already open.


python vs. python3 vs. py

On Windows, you may encounter three different commands for running Python. Understanding the differences avoids confusion:

CommandDescription
pythonThe most common command. Works if python.exe is on your PATH. On most Windows installations, this is the command you will use.
python3Common on macOS and Linux, where python may still point to Python 2. On Windows, this command may or may not work depending on your installation method.
pyThe Python Launcher for Windows. Automatically finds installed Python versions and runs the latest one. Installed by the standard python.org installer but may not be available through the App Portal or portable installations.

Recommendation: Use python for consistency throughout this guide and across RMC projects. If python doesn't work but py does, you can use py as a substitute in all commands.


Verifying Your Installation

Open a new terminal window (Command Prompt, PowerShell, or the VS Code integrated terminal) and run:

python --version

You should see output like:

Python 3.12.4

Then verify that pip (Python's package manager) is available:

pip --version

You should see output like:

pip 24.0 from C:\Users\<username>\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip (python 3.12)

If either command fails, see Troubleshooting for solutions.

Alternative pip command

If pip is not recognized but python is, you can always use python -m pip as an alternative. This runs pip through the Python interpreter directly and bypasses PATH issues with the Scripts folder.