Your diagnosis will appear here. Paste an error and click Diagnose, or try one of the examples on the left.
Recommended install commands
Pick the one that matches your terminal: a prompt that starts with PS is PowerShell, otherwise it is CMD. After installing, open a new terminal window and run claude --version; it only counts as installed if a version number is printed.
irm https://claude.ai/install.ps1 | iex
If you install with npm: Node.js 22 or later is required. Do not use sudo, or later automatic updates will hit permission problems, and to upgrade re-run the same command instead of npm update -g.
npm install -g @anthropic-ai/claude-code@latest
All common errors at a glance
Not sure what to paste? Just find the error you see below.
1'irm' is not recognized / The token '&&' is not a valid statement separator
The command does not match the terminal. Running a PowerShell command in CMD reports that irm is not recognized, running a CMD command in PowerShell reports that && is not a valid separator, and running the macOS curl -fsSL ... | bash line in PowerShell reports that the parameter fsSL cannot be found (curl in PowerShell is an alias of Invoke-WebRequest).
Look at your prompt: with PS it is PowerShell, so use the first command; without PS it is CMD, so use the second one.
irm https://claude.ai/install.ps1 | iex
curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd
2'claude' is not recognized as an internal or external command
The install location (%USERPROFILE%\.local\bin) has not been added to PATH yet, or you did not open a new terminal after installing.
First confirm the file exists. If it returns True, add the folder to your user PATH, restart the terminal and run claude --version. If you run it in an editor’s built-in terminal, quit the editor completely and reopen it, because that terminal gets its PATH from the editor.
Test-Path "$env:USERPROFILE\.local\bin\claude.exe"
$currentPath = [Environment]::GetEnvironmentVariable('PATH', 'User')
[Environment]::SetEnvironmentVariable('PATH', "$currentPath;$env:USERPROFILE\.local\bin", 'User')claude --version
3syntax error near unexpected token '<' / < was unexpected at this time / System.Xml.XmlDocument / 403
What was downloaded is not the install script but a web page or an error status. Common reasons: a company proxy or firewall blocked the download, a temporary fault or network fluctuation, or the official service judged your region unavailable (the output will contain App unavailable in region).
First check that your network and proxy can reach claude.ai, wait a few minutes and retry the same command. Note that winget and Homebrew use the same servers, so switching installers does not solve network or region problems.
4App unavailable in region
The official service judged the region of your current network as unavailable. This is a server-side restriction, and changing the install method does not solve it.
Claude Code is only available in the countries and regions Anthropic supports, and the official page has the list. You can first check whether the location of your current exit is on the supported list.
5Could not create SSL/TLS secure channel / CRYPT_E_NO_REVOCATION_CHECK
The TLS handshake failed, which is common with older Windows PowerShell 5.1 or on company networks that inspect certificates.
In PowerShell 5.1, enable TLS 1.2 first and then run the install command in the same window. If a company proxy inspects certificates, ask IT to add the proxy’s root certificate to the Windows certificate store, and for errors such as CRYPT_E_NO_REVOCATION_CHECK where the revocation check is blocked, install with winget instead.
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
irm https://claude.ai/install.ps1 | iex
6running scripts is disabled on this system
You only run into this when installing with npm: PowerShell’s execution policy blocks the .ps1 launcher script that npm generates.
Pick any one: relax the execution policy for the current user (command below), use npm.cmd / claude.cmd instead, or switch to the native installer, which is not affected by this policy.
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
7The process cannot access the file ... because it is being used by another process
A previous install is still running, or antivirus software is scanning the half-downloaded file, so the file is in use.
Close any other PowerShell windows that are installing, wait for the antivirus scan to finish, clear the download folder and try again.
Remove-Item -Recurse -Force "$env:USERPROFILE\.claude\downloads"
irm https://claude.ai/install.ps1 | iex
8Claude Code on Windows requires Git for Windows (or PowerShell)
Claude Code needs a usable shell: it uses Bash if Git Bash is installed, otherwise PowerShell, and it only reports an error when neither can be found.
Install Git for Windows from git-scm.com, tick Add to PATH during setup and restart the terminal. If it is installed but still not found, you can set the path in settings.json (it must point to a file named bash.exe or sh.exe; pointing to git-bash.exe is ignored).
{
"env": {
"CLAUDE_CODE_GIT_BASH_PATH": "C:\\Program Files\\Git\\bin\\bash.exe"
}
}9claude opens the Claude desktop app instead of the command line
Older versions of Claude Desktop register a Claude.exe in the WindowsApps folder, which comes before the command line in PATH, so typing claude opens the desktop app.
Update Claude Desktop to the latest version.
Based on Anthropic’s official installation docs, checked on 2026-11-18. Official commands and behavior may change, so rely on the official docs. Open the official install docs