> ## 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

export const Comments = ({children}) => {
  return <div class="my-4 px-5 py-4 overflow-hidden rounded-2xl flex gap-3 border border-zinc-500/20 bg-zinc-50/50 dark:border-zinc-500/30 dark:bg-zinc-500/10" data-callout-type="comments">
      <div class="w-4">
        <svg width="14" height="14" viewBox="0 0 640 640" fill="currentColor" xmlns="http://www.w3.org/2000/svg" class="w-5 h-5" aria-label="Comments">
            <path d="M320 112C434.9 112 528 205.1 528 320C528 434.9 434.9 528 320 528C205.1 528 112 434.9 112 320C112 205.1 205.1 112 320 112zM320 576C461.4 576 576 461.4 576 320C576 178.6 461.4 64 320 64C178.6 64 64 178.6 64 320C64 461.4 178.6 576 320 576zM280 400C266.7 400 256 410.7 256 424C256 437.3 266.7 448 280 448L360 448C373.3 448 384 437.3 384 424C384 410.7 373.3 400 360 400L352 400L352 312C352 298.7 341.3 288 328 288L280 288C266.7 288 256 298.7 256 312C256 325.3 266.7 336 280 336L304 336L304 400L280 400zM320 256C337.7 256 352 241.7 352 224C352 206.3 337.7 192 320 192C302.3 192 288 206.3 288 224C288 241.7 302.3 256 320 256z" />
        </svg>
      </div>
      <div class="text-sm prose min-w-0 w-full">
        {children}
      </div>
    </div>;
};

export const TroubleshootSolution = ({children}) => <>
    <hr className="my-3 w-full" />
    <details className="mt-3">
      <summary className="cursor-pointer font-semibold text-base mb-1">
        Solution
      </summary>
      <div className="mt-2 ml-4" data-component-part="step-content">
        {children}
      </div>
    </details>
  </>;

export const TroubleshootCause = ({children}) => <details className="mt-3 mb-2">
    <summary className="cursor-pointer font-semibold text-base mb-1">
      Cause
    </summary>
    <div className="mt-2 ml-4" data-component-part="step-content">
      {children}
    </div>
  </details>;

export const TroubleshootTitle = ({children}) => <>
    <p className="m-0 font-semibold text-xl leading-tight mb-2" role="heading" aria-level={3}>
      {children}
    </p>
    <hr className="my-3 w-full" />
  </>;

export const Troubleshoot = ({children}) => <div className="callout my-4 px-5 py-4 overflow-hidden rounded-2xl flex gap-3 border troubleshoot-admonition dark:troubleshoot-admonition" data-callout-type="troubleshoot">
    <div className="mt-0.5 w-4">
      <svg width="14" height="14" viewBox="0 0 640 640" fill="currentColor" className="w-4 h-4" aria-label="Troubleshoot">
        <path d="M541.4 162.6C549 155 561.7 156.9 565.5 166.9C572.3 184.6 576 203.9 576 224C576 312.4 504.4 384 416 384C398.5 384 381.6 381.2 365.8 376L178.9 562.9C150.8 591 105.2 591 77.1 562.9C49 534.8 49 489.2 77.1 461.1L264 274.2C258.8 258.4 256 241.6 256 224C256 135.6 327.6 64 416 64C436.1 64 455.4 67.7 473.1 74.5C483.1 78.3 484.9 91 477.4 98.6L388.7 187.3C385.7 190.3 384 194.4 384 198.6L384 240C384 248.8 391.2 256 400 256L441.4 256C445.6 256 449.7 254.3 452.7 251.3L541.4 162.6z" />
      </svg>
    </div>
    <div className="prose min-w-0 w-full">{children}</div>
  </div>;

Spyder is an open-source <Tooltip tip="A suite of software tools that combines everything a developer needs to write and test software.">integrated development environment (IDE)</Tooltip> 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).
</Tip>

## 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.

<Tabs>
  <Tab title="Navigator">
    To install Spyder using Navigator:

    1. [Activate the environment](/docs/legacy/anaconda-navigator/tutorials/manage-environments#activating-and-using-an-environment) where you want to install Spyder.
    2. Click **Install** on the Spyder tile.

           <Frame>
             <img src="https://mintcdn.com/anaconda-29683c67/jLsqrZPhnujjrtke/images/getting-started/install_spyder.png?fit=max&auto=format&n=jLsqrZPhnujjrtke&q=85&s=585786e6e94c119ddddd256c7f0e676b" alt="The Spyder tile in Anaconda Navigator with the Install button." width="3460" height="2172" data-path="images/getting-started/install_spyder.png" />
           </Frame>
  </Tab>

  <Tab title="Command line">
    To install Spyder at the command line:

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

    2. [Activate the environment](/docs/getting-started/working-with-conda/environments#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.
           </Comments>

    3. Install the Spyder package:

       ```sh theme={null}
       conda install spyder
       ```
  </Tab>
</Tabs>

## Launching Spyder

Launch Spyder using either Navigator or a command line terminal:

<Tabs>
  <Tab title="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>

  <Tab title="Command line">
    To launch Spyder at the command line:

    1. Open <Tooltip tip="A command-line application included with Windows installations of Anaconda Distribution and Miniconda. Find it by searching 'Anaconda Prompt' in the Windows Start menu.">Anaconda Prompt</Tooltip> (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.
           </Comments>

    3. Launch Spyder:

       ```sh theme={null}
       spyder
       ```
  </Tab>
</Tabs>

<Troubleshoot>
  <TroubleshootTitle>
    ### Spyder errors or failure to launch on Windows
  </TroubleshootTitle>

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

  <TroubleshootSolution>
    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 <Tooltip tip="A command-line application included with Windows installations of Anaconda Distribution and Miniconda. Find it by searching 'Anaconda Prompt' in the Windows Start menu.">Anaconda Prompt</Tooltip> 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.
           </Note>
  </TroubleshootSolution>
</Troubleshoot>

## Creating and activating a conda environment

Before starting your Python project, Anaconda recommends creating a <Tooltip tip="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.">conda environment</Tooltip> to isolate your project's software packages and manage their dependencies. For more information about creating and activating a conda environment, see [Environments](/docs/getting-started/working-with-conda/environments).

<h2 id="selecting-your-environments-python-interpreter">
  Selecting your environment's Python interpreter
</h2>

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.

   <Frame>
     <img src="https://mintcdn.com/anaconda-29683c67/hgx76PC52c929nfw/images/getting-started/spyder_interpreter.png?fit=max&auto=format&n=hgx76PC52c929nfw&q=85&s=971a26a3620456421a60293a7fcb5041" alt="The status bar in Spyder showing the current environment name." width="3460" height="2172" data-path="images/getting-started/spyder_interpreter.png" />
   </Frame>

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 <Tooltip tip="A command-line application included with Windows installations of Anaconda Distribution and Miniconda. Find it by searching 'Anaconda Prompt' in the Windows Start menu.">Anaconda Prompt</Tooltip> (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.
   </Comments>

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.
   </Comments>

   <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.
   </Note>

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](/docs/getting-started/working-with-conda/ides/python-path).

## Adding packages to your environment

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

1. Open <Tooltip tip="A command-line application included with Windows installations of Anaconda Distribution and Miniconda. Find it by searching 'Anaconda Prompt' in the Windows Start menu.">Anaconda Prompt</Tooltip> (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.
   </Comments>

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.
   </Comments>

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](/docs/getting-started/working-with-conda/packages/install-packages).

## Updating Spyder

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

1. Open <Tooltip tip="A command-line application included with Windows installations of Anaconda Distribution and Miniconda. Find it by searching 'Anaconda Prompt' in the Windows Start menu.">Anaconda Prompt</Tooltip> (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.
   </Comments>

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.
</Note>

## 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](/docs/getting-started/working-with-conda/environments).
* To add packages to your environment, see [Installing conda packages](/docs/getting-started/working-with-conda/packages/install-packages).
