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

# Spyder

Spyder is an open-source integrated development environment (IDE) (A suite of software tools that combines everything a developer needs to write and test software.) included with Anaconda Distribution that offers advanced editing, interactive testing, debugging, and introspection features. Spyder integrates with popular scientific libraries such as NumPy, SciPy, and pandas.

> [!TIP]
>
> More of a visual learner? [Sign in to Anaconda.com](https://auth.anaconda.com/ui/login?return_to=https://anaconda.com/app/) and enroll in our Get Started with Anaconda course to learn to [create a simple Python program with Spyder](https://learning.anaconda.com/courses/take/get-started-with-anaconda/lessons/63068071-create-a-simple-python-program-in-spyder).

## Installing Spyder

Spyder is included with Anaconda Distribution and can be installed using Navigator. To use Spyder with Miniconda, you must install the Spyder package on the command line.

> [tab] Navigator
>
> To install Spyder using Navigator:
>
> 1. [Activate the environment](https://anaconda.com/docs/legacy/anaconda-navigator/tutorials/manage-environments.md#activating-and-using-an-environment) where you want to install Spyder.
> 2. Click **Install** on the Spyder tile.
>
>    ![The Spyder tile in Anaconda Navigator with the Install button.](https://mintcdn.com/anaconda-29683c67/jLsqrZPhnujjrtke/images/getting-started/install_spyder.png?fit=max\&auto=format\&n=jLsqrZPhnujjrtke\&q=85\&s=585786e6e94c119ddddd256c7f0e676b)

> [tab] Command line
>
> To install Spyder at the command line:
>
> 1. Open Anaconda Prompt (A command-line application included with Windows installations of Anaconda Distribution and Miniconda. Find it by searching 'Anaconda Prompt' in the Windows Start menu.) (Terminal on macOS/Linux).
>
> 2. [Activate the environment](https://anaconda.com/docs/getting-started/working-with-conda/environments.md#activating-an-environment) where you want to install Spyder:
>
>    ```sh theme={null}
>    conda activate <ENV_NAME>
>    ```
>
>    Comments
>
>    Replace \<ENV\_NAME> with the name of your environment.
>
> 3. Install the Spyder package:
>
>    ```sh theme={null}
>    conda install spyder
>    ```

## Launching Spyder

Launch Spyder using either Navigator or a command line terminal:

> [tab] Navigator
>
> To launch Spyder using Navigator:
>
> 1. Open Navigator.
> 2. Activate the environment where you installed Spyder.
> 3. From the **Home** tab, click **Launch** on the Spyder tile.

> [tab] Command line
>
> To launch Spyder at the command line:
>
> 1. Open Anaconda Prompt (A command-line application included with Windows installations of Anaconda Distribution and Miniconda. Find it by searching 'Anaconda Prompt' in the Windows Start menu.) (Terminal on macOS/Linux).
>
> 2. Activate the environment where you installed Spyder:
>
>    ```sh theme={null}
>    conda activate <ENV_NAME>
>    ```
>
>    Comments
>
>    Replace \<ENV\_NAME> with the name of your environment.
>
> 3. Launch Spyder:
>
>    ```sh theme={null}
>    spyder
>    ```

Troubleshoot

### Spyder errors or failure to launch on Windows

***

<details>
  <summary>Cause</summary>

  This might be caused by errors in the Spyder setting and configuration files.
</details>

***

<details>
  <summary>Solution</summary>

  1. Close and relaunch Spyder and see if the problem remains.
  2. Open the Start Menu and then click **Reset Spyder Settings** and see if the problem remains.
  3. Close Spyder and relaunch it from Anaconda Prompt (A command-line application included with Windows installations of Anaconda Distribution and Miniconda. Find it by searching 'Anaconda Prompt' in the Windows Start menu.) with the following command:

     ```sh theme={null}
     spyder
     ```
  4. Delete the `.spyder-py3` directory and then repeat the first item in this list. This directory is located at `C:\Users\<USERNAME>\.spyder-py3`.

     > [!NOTE]
     >
     > Replace `<USERNAME>` with your Windows username as it appears in the `Users` folder.
</details>

## Creating and activating a conda environment

Before starting your Python project, Anaconda recommends creating a conda environment (An isolated folder containing specific conda packages and dependencies that won't interfere with other projects. Each environment maintains its own versions of libraries and packages, so changes in one environment don't affect others.) to isolate your project's software packages and manage their dependencies. For more information about creating and activating a conda environment, see [Environments](https://anaconda.com/docs/getting-started/working-with-conda/environments.md).

## Selecting your environment's Python interpreter

To ensure your code has access to the correct code completion and type information for your project, select the conda environment associated with your project as the Python interpreter in Spyder.

1. Open Spyder.

2. Click the environment name in the status bar at the bottom of the Spyder window, then click **Change default environment in Preferences...** to open the **Python interpreter** preferences.

   ![The status bar in Spyder showing the current environment name.](https://mintcdn.com/anaconda-29683c67/hgx76PC52c929nfw/images/getting-started/spyder_interpreter.png?fit=max\&auto=format\&n=hgx76PC52c929nfw\&q=85\&s=971a26a3620456421a60293a7fcb5041)

3. Select **Selected interpreter**.

4. Select your environment from the dropdown. If it isn't listed, enter or browse to the path of its Python interpreter.

5. Click **OK**.

### Using an external conda environment

If you want to run code in a conda environment that does not have Spyder installed, you must install the `spyder-kernels` package in that environment. Spyder uses `spyder-kernels` to connect its IPython Console to external interpreters.

To set up an external environment for use with Spyder:

1. Open Anaconda Prompt (A command-line application included with Windows installations of Anaconda Distribution and Miniconda. Find it by searching 'Anaconda Prompt' in the Windows Start menu.) (Terminal on macOS/Linux).

2. Activate the environment you want to use:

   ```sh theme={null}
   conda activate <ENV_NAME>
   ```

   Comments

   Replace \<ENV\_NAME> with the name of the environment you want to connect to Spyder.

3. Install a compatible version of `spyder-kernels`:

   ```sh theme={null}
   conda install spyder-kernels=<VERSION>
   ```

   Comments

   Replace \<VERSION> with the compatible `spyder-kernels` version.

   > [!NOTE]
   >
   > The required version of `spyder-kernels` must match your installed version of Spyder. If the IPython Console displays a version error after restarting the kernel, install the version shown in the error message.

4. In Spyder, select the environment as your [Python interpreter](#selecting-your-environments-python-interpreter).

5. Click **Restart kernel** in the **Consoles** menu for the change to take effect.

For more information on finding a specific interpreter path in your Anaconda installation, see [Finding your Anaconda Python interpreter path](https://anaconda.com/docs/getting-started/working-with-conda/ides/python-path.md).

## Adding packages to your environment

To add packages to the conda environment you are using with Spyder:

1. Open Anaconda Prompt (A command-line application included with Windows installations of Anaconda Distribution and Miniconda. Find it by searching 'Anaconda Prompt' in the Windows Start menu.) (Terminal on macOS/Linux).

2. Activate the environment:

   ```sh theme={null}
   conda activate <ENV_NAME>
   ```

   Comments

   Replace \<ENV\_NAME> with the name of the environment where you want to install the package.

3. Install the package:

   ```sh theme={null}
   conda install <PACKAGE_NAME>
   ```

   Comments

   Replace \<PACKAGE\_NAME> with the name of the package you want to install.

4. In Spyder, click **Restart kernel** in the **Consoles** menu so the new package is available.

For more information on installing packages, see [Installing conda packages](https://anaconda.com/docs/getting-started/working-with-conda/packages/install-packages.md).

## Updating Spyder

To update Spyder to the latest version available in your configured channels:

1. Open Anaconda Prompt (A command-line application included with Windows installations of Anaconda Distribution and Miniconda. Find it by searching 'Anaconda Prompt' in the Windows Start menu.) (Terminal on macOS/Linux).

2. Activate the environment where Spyder is installed:

   ```sh theme={null}
   conda activate <ENV_NAME>
   ```

   Comments

   Replace \<ENV\_NAME> with the name of the environment where Spyder is installed, or use `base` if you installed Spyder in the base environment.

3. Update Spyder:

   ```sh theme={null}
   conda update spyder
   ```

> [!NOTE]
>
> If you installed Spyder in the Anaconda Distribution `base` environment, run `conda update anaconda` before updating Spyder to ensure package compatibility. For more information, see [How do I update Spyder using conda?](https://docs.spyder-ide.org/current/faq.html#update-conda) in the Spyder FAQ.

## Additional resources

* For help with Spyder's interface and features, see the [official Spyder documentation](https://docs.spyder-ide.org/).
* To create, update, or remove conda environments, see [Environments](https://anaconda.com/docs/getting-started/working-with-conda/environments.md).
* To add packages to your environment, see [Installing conda packages](https://anaconda.com/docs/getting-started/working-with-conda/packages/install-packages.md).
