PyCharm 2018.3 Help

Configuring Remote Interpreter via WSL

You can use Windows Subsystem for Linux (WSL) to work with a Python interpreter available in your Linux distribution.

Fulfill the preliminary steps

  1. Click the Windows button in the lower-left corner of the screen and start typing System Information. To ensure that your system works well with WSL, upgrade your Windows to the latest available version.

  2. Install the Windows Subsystem for Linux and initialize your Linux distribution as described in the WSL Installation Guide.

Configure remote interpreter via WSL

  1. In the Settings/Preferences dialog (Ctrl+Alt+S), navigate to the Project Interpreter page (Project < project name > | Project Interpreter).

  2. On this page, click Interpreter settings next to Project Interpreter field, and choose Add:

    Add an interpreter

    The Add Python Interpreter dialog opens.

  3. In the left-hand pane of the dialog box, click WSL.

    Adding a WSL interpreter
  4. Select the Linux distribution and specify the path to the python executable in the selected Linux distribution.

Once done, the new interpreter will be added to your project, and the default mnt mappings will be set.

Newly added WSL interpreter

Note that with WSL you cannot create virtual environments: all packages you install will be added to the corresponding system interpreter. You will be asked to enter your sudo password.

Entering your sudo password
Last modified: 27 February 2019

See Also