Continuum Analytics

How to setup your IDE to use Anaconda

Spyder

Spyder, the Scientific PYthon Development EnviRonment, is great free interactive development environment (IDE) included with Anaconda. It is a powerful IDE for the Python language with advanced editing, interactive testing, debugging and introspection features.

If you’ve installed Anaconda, you do not need to do anything other than type spyder into a terminal or at the Command Prompt.

Anaconda also includes a graphical launcher application, Anaconda Launcher, that enables you to start Spyder with a single click.

  • On Mac, double click Launcher.app in your ~/anaconda directory.
  • On Windows, you’ll find Anaconda Launcher in your Start Menu.
  • On Linux, you’ll need to type launcher into a terminal.

Once Anaconda Launcher has started, click the launch button to start Spyder. (If you’ve never started Spyder, you may need to click the install button next to spyder-app first, so the launch button will appear.)

../_images/Anaconda_Launcher.png

You are now ready to use Spyder as an IDE with Anaconda.

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.
  • File -> New -> Project (keyboard shortcut: Ctrl+Shift+N)
  • Select Python Application
../_images/PTVS_newproj.png
  • Navigate to Tools -> Python Tools -> Python Interactive (keyboard shortcut: Alt+I).
../_images/PTVS_pythoninteractive1.png
  • In the Python Interactive window, type import sys, then hit the enter/return key
  • Type sys.version, then hit the enter/return key
  • If PTVS is using Anaconda, you will see your Anaconda Python version displayed. (Anaconda 1.5.0 (64-bit) in the below example)
../_images/PTVS_pythoninteractive2.png

For more information on PTVS, check out the official PTVS documentation and the PTVS installation instructions.

PyCharm

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

To setup your PyCharm installation to use Anaconda, you’ll need to first navigate to Preferences in PyCharm. There are multiple methods to get to 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

Once 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 ~/anaconda/bin/python or wherever your Anaconda Python is installed.

Once you’ve added Anaconda, you should see it listed in the list of Python Interpreters, as well as the packages that were installed with it. Click OK, and your PyCharm IDE is now setup to use Anaconda.

../_images/PyCharm_preferences2.png

For more information, check out the official PyCharm documentation, particularly the Python Interpreters section.

Eclipse & 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 & PyDev installed:

Or follow this guide showing the installalation process of Eclipse -> selecting Anaconda as your Python interpreter

Note: You may also need to install the latest Java JDK/JRE prior to installing PyDev in order for PyDev to show up in the Eclipse Preferences menu after PyDev installation.

Once you have Eclipse, PyDev, and Anaconda installed:
  • Open the Preferences window within Eclipse.
../_images/Eclipse1.png
  • Navigate to PyDev -> Interpreters -> Python Interpreter
  • Select New...
../_images/Eclipse2.png
  • Enter the Interpreter Name (Anaconda Python)
  • Browse to ~/anaconda/bin/python or wherever your Anaconda Python is installed.
  • Click OK
../_images/Eclipse3.png
  • In the next window, click OK again to select the folders to be added to the SYSTEM pythonpath
../_images/Eclipse4.png
  • The Python Interpreters window will now show 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 setup your Wing IDE installation to use Anaconda:
  • Select the Edit file menu
  • Navigate to Configure Python
../_images/WingIDE1.png
  • Select the Custom option for Python Executable
  • Click Browse… and navigate to ~/anaconda/bin/python or wherever your Anaconda Python is installed
  • Select the Custom option for Python Path
  • Click Insert and browse to ~/anaconda/bin/python or wherever your Anaconda Python is installed
  • Select OK
../_images/WingIDE2.png

You may be prompted to reload your Python shell. After the reload, you should see Anaconda in the Python Shell tab. Wing IDE is now setup to to use Anaconda’s Python.

../_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 Applications Development.

To use Anaconda with Ninja IDE
  • Go to Project -> Open Project Properties
../_images/NinjaIDE_1.png
  • In the Project Execution tab, select Anaconda’s Python for the Python Custom Interpreter
../_images/NinjaIDE_2.png
  • Verify this worked by creating a test file
  • import sys
  • print sys.version
  • In the output screen, you should see your Anaconda Python version listed.
../_images/NinjaIDE_3.png

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