> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/prefix-dev/pixi/llms.txt
> Use this file to discover all available pages before exploring further.

# Installation

> Install Pixi on Linux, macOS, or Windows

# Installing Pixi

Pixi is a single executable that can be installed on macOS, Linux, and Windows. The provided installation scripts will automatically download the latest version, extract it, and add it to your PATH.

## Quick Install

<Tabs>
  <Tab title="Linux & macOS">
    Install Pixi with a single command:

    ```bash theme={null}
    curl -fsSL https://pixi.sh/install.sh | sh
    ```

    If your system doesn't have `curl`, you can use `wget`:

    ```bash theme={null}
    wget -qO- https://pixi.sh/install.sh | sh
    ```

    <Note>
      The script will download Pixi to `~/.pixi/bin` and update your PATH in `~/.bashrc`. You may need to restart your terminal or source your shell configuration.
    </Note>

    ### macOS with Zsh

    Starting with macOS Catalina, `zsh` is the default shell. Use:

    ```zsh theme={null}
    curl -fsSL https://pixi.sh/install.sh | zsh
    ```

    The script will update your `~/.zshrc` to include `~/.pixi/bin` in your PATH.
  </Tab>

  <Tab title="Windows">
    ### PowerShell Install

    Open PowerShell (you may need to run as administrator) and run:

    ```powershell theme={null}
    powershell -ExecutionPolicy ByPass -c "irm -useb https://pixi.sh/install.ps1 | iex"
    ```

    <Warning>
      Changing the execution policy allows running a script from the internet. You can check the script first:
    </Warning>

    ```powershell theme={null}
    powershell -c "irm -useb https://pixi.sh/install.ps1 | more"
    ```

    ### Windows Installer (MSI)

    Download the MSI installer from the [GitHub releases page](https://github.com/prefix-dev/pixi/releases/latest/download/pixi-x86_64-pc-windows-msvc.msi).

    The installer will add Pixi to your PATH automatically.
  </Tab>
</Tabs>

<Tip>
  **Restart your terminal!** After installation, restart your terminal or source your shell configuration to make `pixi` available.
</Tip>

## Alternative Installation Methods

### Homebrew (macOS & Linux)

```bash theme={null}
brew install pixi
```

### Winget (Windows)

```bash theme={null}
winget install prefix-dev.pixi
```

### Scoop (Windows)

```bash theme={null}
scoop install main/pixi
```

### Install from Source

Pixi is 100% written in Rust and can be installed using Cargo:

```bash theme={null}
cargo install --locked --git https://github.com/prefix-dev/pixi.git pixi
```

<Note>
  Pixi is not published to `crates.io` because it depends on some unpublished crates. You must install directly from the GitHub repository.
</Note>

## Linux Distribution Packages

### Arch Linux

Install from the extra repository using `pacman`:

```bash theme={null}
pacman -S pixi
```

### Alpine Linux

Pixi is available for Alpine Edge. Enable the testing repository first:

```bash theme={null}
apk add pixi
```

## Shell Autocompletion

After installing Pixi, enable autocompletion for your shell to improve the CLI experience.

<Tabs>
  <Tab title="Bash">
    Add to `~/.bashrc`:

    ```bash theme={null}
    eval "$(pixi completion --shell bash)"
    ```
  </Tab>

  <Tab title="Zsh">
    Add to `~/.zshrc`:

    ```zsh theme={null}
    eval "$(pixi completion --shell zsh)"
    ```
  </Tab>

  <Tab title="Fish">
    Add to `~/.config/fish/config.fish`:

    ```fish theme={null}
    pixi completion --shell fish | source
    ```
  </Tab>

  <Tab title="PowerShell">
    Add to your PowerShell profile (query `$PROFILE` to find the location):

    ```powershell theme={null}
    (& pixi completion --shell powershell) | Out-String | Invoke-Expression
    ```

    Typical path: `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1`
  </Tab>

  <Tab title="Nushell">
    Run these commands (find your config with `$nu.config-path`):

    ```nushell theme={null}
    mkdir $"($nu.data-dir)/vendor/autoload"
    pixi completion --shell nushell | save --force $"($nu.data-dir)/vendor/autoload/pixi-completions.nu"
    ```
  </Tab>

  <Tab title="Elvish">
    Add to `~/.elvish/rc.elv`:

    ```elv theme={null}
    eval (pixi completion --shell elvish | slurp)
    ```
  </Tab>
</Tabs>

<Tip>
  After adding autocompletion, restart your shell or source the configuration file for changes to take effect.
</Tip>

## Installation Script Options

You can customize the installation using environment variables:

### Linux & macOS Options

| Variable              | Description                            | Default          |
| --------------------- | -------------------------------------- | ---------------- |
| `PIXI_VERSION`        | The version of Pixi to install         | `latest`         |
| `PIXI_HOME`           | Location of the Pixi home folder       | `$HOME/.pixi`    |
| `PIXI_BIN_DIR`        | Location where the binary is installed | `$PIXI_HOME/bin` |
| `PIXI_ARCH`           | Architecture the version was built for | `uname -m`       |
| `PIXI_NO_PATH_UPDATE` | If set, PATH will not be updated       | -                |
| `PIXI_DOWNLOAD_URL`   | Override download URL for mirrors      | GitHub releases  |

#### Examples

Install a specific version:

```bash theme={null}
curl -fsSL https://pixi.sh/install.sh | PIXI_VERSION=v0.18.0 bash
```

Force x86\_64 on Apple Silicon:

```bash theme={null}
curl -fsSL https://pixi.sh/install.sh | PIXI_ARCH=x86_64 bash
```

Drop-in installation to system PATH:

```bash theme={null}
curl -fsSL https://pixi.sh/install.sh | PIXI_BIN_DIR=/usr/local/bin PIXI_NO_PATH_UPDATE=1 bash
```

### Windows Options

| Variable              | Description                      | Default                  |
| --------------------- | -------------------------------- | ------------------------ |
| `PIXI_VERSION`        | The version of Pixi to install   | `latest`                 |
| `PIXI_HOME`           | Location of the installation     | `$Env:USERPROFILE\.pixi` |
| `PIXI_NO_PATH_UPDATE` | If set, PATH will not be updated | `false`                  |
| `PIXI_DOWNLOAD_URL`   | Override download URL            | GitHub releases          |

#### Example

Install a specific version:

```powershell theme={null}
$env:PIXI_VERSION='v0.18.0'; powershell -ExecutionPolicy Bypass -Command "iwr -useb https://pixi.sh/install.ps1 | iex"
```

## Updating Pixi

Update to the latest version:

```bash theme={null}
pixi self-update
```

Update to a specific version:

```bash theme={null}
pixi self-update --version 0.18.0
```

<Note>
  If you installed Pixi using a package manager (brew, conda, paru, etc.), use that package manager's update mechanism instead. For example: `brew upgrade pixi`
</Note>

## Verify Installation

Check that Pixi is installed correctly:

```bash theme={null}
pixi --version
```

You should see output like:

```bash theme={null}
pixi 0.59.0
```

## Uninstalling Pixi

Before uninstalling, you may want to clean up Pixi-managed data:

<Steps>
  <Step title="Clean cache">
    ```bash theme={null}
    pixi clean cache
    ```
  </Step>

  <Step title="Remove workspace environments">
    Navigate to your workspace and run:

    ```bash theme={null}
    pixi clean
    ```
  </Step>

  <Step title="Remove Pixi directory">
    **Linux & macOS:**

    ```bash theme={null}
    rm -rf ~/.pixi
    ```

    **Windows:**

    ```powershell theme={null}
    Remove-Item -Recurse -Force $Env:USERPROFILE\.pixi
    ```
  </Step>

  <Step title="Remove from PATH">
    Remove `~/.pixi/bin` (or `%UserProfile%\.pixi\bin` on Windows) from your shell configuration file.
  </Step>
</Steps>

## Troubleshooting

### Command not found after installation

If you get "command not found" after installation:

1. Restart your terminal
2. Or source your shell configuration:
   * Bash: `source ~/.bashrc`
   * Zsh: `source ~/.zshrc`
3. Verify `~/.pixi/bin` is in your PATH:
   ```bash theme={null}
   echo $PATH
   ```

### Permission denied on Linux/macOS

If you get permission errors:

```bash theme={null}
chmod +x ~/.pixi/bin/pixi
```

## Next Steps

<CardGroup cols={2}>
  <Card title="Quick Start" icon="rocket" href="/quickstart">
    Create your first Pixi workspace
  </Card>

  <Card title="Basic Usage" icon="book" href="/basic-usage">
    Learn essential Pixi commands
  </Card>
</CardGroup>
