Running OpenHands GUI on Windows Without WSL
This guide provides step-by-step instructions for running OpenHands on a Windows machine without using WSL or Docker.Prerequisites
- Windows 10/11 - A modern Windows operating system
- PowerShell 7+ - While Windows PowerShell comes pre-installed on Windows 10/11, PowerShell 7+ is strongly recommended to avoid compatibility issues (see Troubleshooting section for “System.Management.Automation” errors)
- .NET Core Runtime - Required for the PowerShell integration via pythonnet
- Python 3.12 or 3.13 - Python 3.12 or 3.13 is required (Python 3.14 is not supported due to pythonnet compatibility)
- Git - For cloning the repository and version control
- Node.js and npm - For running the frontend
Step 1: Install Required Software
-
Install Python 3.12 or 3.13
- Download Python 3.12.x or 3.13.x from python.org
- During installation, check “Add Python to PATH”
- Verify installation by opening PowerShell and running:
-
Install PowerShell 7
- Download and install PowerShell 7 from the official PowerShell GitHub repository
- Choose the MSI installer appropriate for your system (x64 for most modern computers)
- Run the installer with default options
- Verify installation by opening a new terminal and running:
- Using PowerShell 7 (pwsh) instead of Windows PowerShell will help avoid “System.Management.Automation” errors
-
Install .NET Core Runtime
- Download and install the .NET Core Runtime from Microsoft’s .NET download page
- Choose the latest .NET Core Runtime (not SDK)
- Verify installation by opening PowerShell and running:
- This step is required for the PowerShell integration via pythonnet. Without it, OpenHands will fall back to a more limited PowerShell implementation.
-
Install Git
- Download Git from git-scm.com
- Use default installation options
- Verify installation:
-
Install Node.js and npm
- Download Node.js from nodejs.org (LTS version recommended)
- During installation, accept the default options which will install npm as well
- Verify installation:
-
Install Poetry
- Open PowerShell as Administrator and run:
- Add Poetry to your PATH:
- Verify installation:
- Open PowerShell as Administrator and run:
Step 2: Clone and Set Up OpenHands
-
Clone the Repository
-
Install Dependencies
This will install all required dependencies, including:
- pythonnet - Required for Windows PowerShell integration
- All other OpenHands dependencies
Step 3: Run OpenHands
-
Build the Frontend
This will build the frontend files that the backend will serve.
-
Start the Backend
This will start the OpenHands app using the local runtime with PowerShell integration, available at
localhost:3000
.Note: If you encounter a
RuntimeError: Directory './frontend/build' does not exist
error, make sure you’ve built the frontend first using the command above.Important: Using PowerShell 7 (pwsh) instead of Windows PowerShell is recommended to avoid “System.Management.Automation” errors. If you encounter this error, see the Troubleshooting section below.
-
Alternatively, Run the Frontend in Development Mode (in a separate PowerShell window)
-
Access the OpenHands GUI
Open your browser and navigate to:
Note: If you’re running the frontend in development mode (using
npm run dev
), use port 3001 instead:http://localhost:3001
Installing and Running the CLI
To install and run the OpenHands CLI on Windows without WSL, follow these steps:1. Install uv (Python Package Manager)
Open PowerShell as Administrator and run:2. Install .NET SDK (Required)
The OpenHands CLI requires the .NET Core runtime for PowerShell integration. Without it, the CLI will fail to start with acoreclr
error. Install the .NET SDK which includes the runtime:
3. Install and Run OpenHands
After installing the prerequisites, you can install and run OpenHands with:Troubleshooting CLI Issues
CoreCLR Error
If you encounter an error likeFailed to load CoreCLR
or pythonnet.load('coreclr')
when running OpenHands CLI, this indicates that the .NET Core runtime is missing or not properly configured. To fix this:
- Install the .NET SDK as described in step 2 above
- Verify that your system PATH includes the .NET SDK directories
- Restart your PowerShell session completely after installing the .NET SDK
- Make sure you’re using PowerShell 7 (pwsh) rather than Windows PowerShell
Limitations on Windows
When running OpenHands on Windows without WSL or Docker, be aware of the following limitations:- Browser Tool Not Supported: The browser tool is not currently supported on Windows.
-
.NET Core Requirement: The PowerShell integration requires .NET Core Runtime to be installed. The CLI implementation attempts to load the CoreCLR at startup with
pythonnet.load('coreclr')
and will fail with an error if .NET Core is not properly installed. - Interactive Shell Commands: Some interactive shell commands may not work as expected. The PowerShell session implementation has limitations compared to the bash session used on Linux/macOS.
-
Path Handling: Windows uses backslashes (
\
) in paths, which may require adjustments when working with code examples designed for Unix-like systems.
Troubleshooting
”System.Management.Automation” Not Found Error
If you encounter an error message stating that “System.Management.Automation” was not found, this typically indicates that you have a minimal version of PowerShell installed or that the .NET components required for PowerShell integration are missing.IMPORTANT: This error is most commonly caused by using the built-in Windows PowerShell (powershell.exe) instead of PowerShell 7 (pwsh.exe). Even if you installed PowerShell 7 during the prerequisites, you may still be using the older Windows PowerShell by default.To resolve this issue:
-
Install the latest version of PowerShell 7 from the official Microsoft repository:
- Visit https://github.com/PowerShell/PowerShell/releases
- Download and install the latest MSI package for your system architecture (x64 for most systems)
- During installation, ensure you select the following options:
- “Add PowerShell to PATH environment variable”
- “Register Windows PowerShell 7 as the default shell”
- “Enable PowerShell remoting”
- The installer will place PowerShell 7 in
C:\Program Files\PowerShell\7
by default
- Restart your terminal or command prompt to ensure the new PowerShell is available
-
Verify the installation by running:
You should see output indicating PowerShell 7.x.x
-
Run OpenHands using PowerShell 7 instead of Windows PowerShell:
Note: Make sure you’re explicitly using
pwsh
(PowerShell 7) and notpowershell
(Windows PowerShell). The command prompt or terminal title should say “PowerShell 7” rather than just “Windows PowerShell”. -
If the issue persists, ensure that you have the .NET Runtime installed:
- Download and install the latest .NET Runtime from Microsoft’s .NET download page
- Choose ”.NET Runtime” (not SDK) version 6.0 or later
- After installation, verify it’s properly installed by running:
- Restart your computer after installation
- Try running OpenHands again
-
Ensure that the .NET Framework is properly installed on your system:
- Go to Control Panel > Programs > Programs and Features > Turn Windows features on or off
- Make sure ”.NET Framework 4.8 Advanced Services” is enabled
- Click OK and restart if prompted