How to set up an IDE to use Anaconda¶
The following integrated development environments (IDEs) can be used to run Anaconda:
Spyder, the Scientific PYthon Development EnviRonment, is a free interactive development environment (IDE) included with Anaconda. It includes editing, interactive testing, debugging and introspection features.
After you’ve 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.
On OS X and Windows you can also start Spyder with the graphical Anaconda Launcher:
- OS X: go to your ~/anaconda directory and double-click Launcher.app.
- Windows: go to the Start Menu and select Anaconda Launcher.
After Anaconda Launcher has started, click the launch button to start Spyder. (You may need to click the install button next to spyder-app first. The launch button appears after installation completes.)
You are now ready to use Spyder as an IDE with Anaconda.
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.
To check which Python the project uses:
- Navigate to Tools -> Python Tools -> Python Interactive (keyboard shortcut: ALT+I).
- In the Python Interactive window, type import sys, then press Enter.
- 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.)
PyCharm is an intelligent Python IDE offered in a Community version (free) and a Professional version (paid) for Windows, OS X and Linux.
Use PyCharm’s Preferences to set it to use Anaconda. 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.
After the Preferences window is open, navigate to Project Interpreter -> Python Interpreters. Click on the + sign to add Anaconda to the Python Interpreters list.
If the Anaconda Python path is not listed, select Local... and navigate to the directory you installed Anaconda Python in. Typically this directory is ~/anaconda/bin/python.
After you’ve added Anaconda, you will see it in the list of Python Interpreters, as well as the packages that were installed with it. Click OK, and the PyCharm IDE is now set up to use Anaconda.
If you do not already have Eclipse & PyDev installed:
- Download Eclipse and read the Eclipse resources.
- You may need to install the latest Java JDK/JRE before installing PyDev in order for PyDev to show up in the Eclipse Preferences menu after PyDev installation.
- Install PyDev.
After you have Eclipse, PyDev, and Anaconda installed, set Anaconda Python as your default by adding it as a new interpreter, and then selecting the new interpreter.
- Open the Eclipse Preferences window:
- Go to PyDev -> Interpreters -> Python Interpreter.
- Click the New button:
- In the “Interpreter Name” box type “Anaconda Python”.
- Browse to ~/anaconda/bin/python or wherever your Anaconda Python is installed.
- Click the OK button.
- In the next window, select all the folders and click the OK button again to select the folders to be added to the SYSTEM python path.
- The Python Interpreters window will now show Anaconda Python. Click OK.
You are now ready to use Anaconda Python with your Eclipse and PyDev installation.
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:
- Navigate to the Python configuration window: Menu -> Edit -> Configure Python
- 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.
You may be prompted to reload your Python shell. After the reload, you should see Anaconda in the Python Shell tab.
Wing IDE can use Anaconda’s Python now.
For more information, check out the official Wing IDE documentation.
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:
- Go to Project -> Open Project Properties
- In the Project Execution tab, select Anaconda Python for the Python Custom Interpreter. Enter the full path to the installed python interpreter.
- Verify this worked by creating a test script. Enter this code:
import sys print(sys.version)
- Run your test script. In the output screen, you will see your Anaconda Python version listed.
For more information, check out the Ninja-IDE documentation.