PyCharm 2016.1 Help

Configuring Python Interpreter for a Project

In this section:


PyCharm helps assign a Python interpreter for a project. So doing, each one of the projects, opened in the same window, can have an interpreter of its own, selected from the list of available interpreters.

Note that PyCharm stores only the interpreter name in the project settings.

Selecting Python interpreter for a project

To configure Python SDK for the current project follow these steps:

  1. Open the Settings dialog box, and click Project Interpreter page.
  2. In the Projects pane, choose the desired project.
  3. For the selected project, choose SDK from the list of available Python interpreters and virtual environments.

    This list includes:

    • Python interpreters, which reside in standard locations.
    • Virtual environments, which reside under the project folder, or under the folder specified as an environment variable WORKON_HOME.
    • Other Python interpreters, installed locally or remotely.
  4. If the desired interpreter is not in the list, click cogwheel_framed, and configure the desired interpreter as described in the section Configuring Available Python Interpreters. For example, look at the following image:
  5. Apply changes.

Working on the same project on different platforms

You can work on the same PyCharm project on different platforms (for example, on Windows at work, and on MacOS at home).
This can be easily done, if you rename the project interpreter.

The reason is that PyCharm stores the interpreter name with the project, but not the interpreter path.

To rename an interpreter, follow these steps:

  1. In the Settings/Preferences dialog, click the page Project Interpreter, and select the desired project.
  2. Click the drop-down list Project Interpreter, and choose Show All:

    The dialog box Project Interpreters opens:

  3. Choose the desired interpreter and click edit1. The dialog box Edit Python Interpreter appears.
  4. In this dialog, change the interpreter name as required:

Note that only this name is stored with the project settings, making it possible to use different interpreters on each platform, without changing the project settings every time you switch to another platform.

See Also


Language and Framework-Specific Guidelines:

Last modified: 20 April 2016