Skip to content

How to install Claude Code

Install Claude Code with Anthropic’s native installer. Do not use pip install claude-code, pip install claude, or uv tool install claude-code: those PyPI projects are reserved placeholders, not Anthropic’s CLI.

Prerequisites

  • A supported macOS, Linux, or Windows system with an internet connection
  • An eligible Claude subscription, Anthropic Console account, or supported cloud provider

Run the native installer

Open a terminal and run the command for your system:

curl -fsSL https://claude.ai/install.sh | bash

The installer may show no progress while it downloads Claude Code. Open a new terminal after it finishes so your shell picks up the installed command. Native installations update automatically.

Verify the command

Run:

claude --version

A working installation prints a version number followed by (Claude Code). If your shell cannot find claude, follow Anthropic’s PATH troubleshooting steps.

Avoid the PyPI placeholders

PyPI labels both claude-code and claude as “Reserved.” Installing either name with pip does not install Anthropic’s claude command. uv rejects uv tool install claude-code because the placeholder package provides no executable.

Use the native installer unless your organization requires a package manager. Anthropic also documents Homebrew, WinGet, apt, dnf, and apk installations in the official setup guide.

Install through npm when required

If you already manage Node.js 22 or later and need npm, install Anthropic’s scoped package:

npm install -g @anthropic-ai/claude-code@latest

Do not add sudo; a root-owned npm installation can prevent Claude Code from updating itself. The scoped npm package installs the same native binary as the standalone installer. Run claude --version to verify it.

Run claude to sign in after installation. For a Python project, continue with how to configure Claude Code to use uv.

Last updated on