How to set up an IDE to use Anaconda

The following integrated development environments (IDEs) can be used to run Anaconda:

Spyder

Spyder, the Scientific PYthon Development EnviRonment, is a free interactive development environment (IDE) that is included with Anaconda. It includes editing, interactive testing, debugging and introspection features.

After you have installed Anaconda, you can start Spyder on OS X, Linux, or Windows by opening a Terminal or Command Prompt window and running the command spyder.

Spyder is also pre-installed in the graphical Anaconda Navigator included in Anaconda. In the Navigator “Home” tab, just click the Spyder icon.

Python Tools for Visual Studio (PTVS)

Python Tools for Visual Studio is a free, open source plugin that turns Visual Studio into a Python IDE.

If you’ve installed Anaconda as your default Python installation and installed PTVS, your Visual Studio installation is already set to use Anaconda’s Python interpreter in PTVS.

You can verify this by creating a new Python project and checking whether Anaconda is the Python it uses.

  • To create a new Python project, navigate to File -> New -> Project (keyboard shortcut: CTRL+SHIFT+N) and select Python Application.
../_images/PTVS_newproj.png
  • To check which Python the project uses, navigate to Tools -> Python Tools -> Python Interactive (keyboard shortcut: ALT+I).
../_images/PTVS_pythoninteractive1.png
  1. In the Python Interactive window, type import sys, then press Enter.
  2. Type sys.version, then press Enter.

If PTVS is using Anaconda, you will see your Anaconda Python version displayed. (Anaconda 1.5.0 (64-bit) in the example below.)

../_images/PTVS_pythoninteractive2.png

If PTVS does not automatically discover Anaconda, see the official PTVS documentation, especially the section on Selecting and Installing Python Interpreters and the PTVS installation instructions.

PyCharm

PyCharm is an intelligent Python IDE for Windows, OS X and Linux, that is offered in a Community version for free and a Professional version for a fee.

Use PyCharm’s Preferences to set it to use Anaconda. There are multiple methods to access the Preferences Window, including selecting Preferences within the PyCharm file menu or by clicking the Preferences icon in the top icon bar.

../_images/PyCharm_iconbar.png ../_images/PyCharm_menu.png

After the Preferences window is open, navigate to Project Interpreter -> Python Interpreters. Click on the + sign to add Anaconda to the Python Interpreters list.

../_images/PyCharm_preferences1.png

If the Anaconda Python path is not listed, select Local... and navigate to the Anaconda Python interpreter path.

After you have added Anaconda, you will see it displayed in the list of Python Interpreters, along with the other packages that were installed with it. Click OK. The PyCharm IDE is now set up to use Anaconda.

../_images/PyCharm_preferences2.png

MORE INFO: Official PyCharm documentation, and the Configuring Available Python Interpreters section.

Eclipse and PyDev

Eclipse is an open-source platform that provides an array of convenient and powerful code editing and debugging tools. PyDev is a Python IDE that runs on top of Eclipse.

If you do not already have Eclipse and PyDev installed:

After you have Eclipse, PyDev, and Anaconda installed, follow these steps to set Anaconda Python as your default by adding it as a new interpreter, and then selecting that new interpreter:

  1. Open the Eclipse Preferences window:
../_images/Eclipse1.png
  1. Go to PyDev -> Interpreters -> Python Interpreter.
  2. Click the New button:
../_images/Eclipse2.png
  1. In the “Interpreter Name” box, type “Anaconda Python”.
  2. Browse to the Anaconda Python interpreter path.
  3. Click the OK button.
../_images/Eclipse3.png

7. In the next window, select all the folders and click the OK button again to select the folders to add to the SYSTEM python path.

../_images/Eclipse4.png
  1. The Python Interpreters window will now display Anaconda Python. Click OK.
../_images/Eclipse5.png

You are now ready to use Anaconda Python with your Eclipse and PyDev installation.

Wing IDE

Wing IDE is an IDE designed specifically for the Python programming language. Wing IDE is offered in Professional, Personal, and Free 101 versions.

To set up your Wing IDE installation to use Anaconda:

  1. Navigate to the Python configuration window: Menu -> Edit -> Configure Python
../_images/WingIDE1.png
  1. Select the Custom option for Python Executable.
  2. Click Browse... and navigate to the Anaconda Python interpreter path.
  3. Select the Custom option for Python Path.
  4. Click Insert and browse to the Anaconda Python interpreter path.
  5. Select OK.
../_images/WingIDE2.png
  1. If you are prompted to reload your Python shell, do so. After the reload, you will see Anaconda in the Python Shell tab.

Wing IDE can use Anaconda’s Python now.

../_images/WingIDE3.png

For more information, check out the official Wing IDE documentation.

Ninja IDE

Ninja IDE is a cross-platform free and open source IDE specially designed for Python application development.

To use Anaconda Python with the Ninja IDE:

  1. Go to Project -> Open Project Properties
../_images/NinjaIDE_1.png
  1. In the Project Execution tab, select Anaconda Python for the Python Custom Interpreter. Enter the Anaconda Python interpreter path.
../_images/NinjaIDE_2.png
  1. Verify that this works by creating a test script. Enter this code:
import sys
print(sys.version)
  1. Run your test script. In the output screen, you will see your Anaconda Python version listed.
../_images/NinjaIDE_3.png

For more information, check out the Ninja-IDE documentation.

Finding your Anaconda Python interpreter path

IDEs often require you to specify the path to your Python interpreter. The Python interpreter in Anaconda is usually installed in your home directory in a folder such as anaconda/bin/python.

On Windows this might be a path such as C:\Users\Jane Smith\anaconda\bin\python.

On macOS this might be a path such as ~/anaconda/bin/python or /Users/jsmith/anaconda/bin/python.

On Linux this might be a path such as ~/anaconda/bin/python or /home/jsmith/anaconda/bin/python.

As well as anaconda, the folder in your home directory might be named anaconda2 or anaconda3.

If you have installed Miniconda instead of Anaconda, the folder might be named miniconda, miniconda2, or miniconda3.