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
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.
Install the Windows Subsystem for Linux and initialize your Linux distribution as described in the WSL Installation Guide.
Configure remote interpreter via WSL
In the Settings/Preferences dialog (Ctrl+Alt+S), navigate to the Project Interpreter page ( ).
On this page, click next to Project Interpreter field, and choose :
The Add Python Interpreter dialog opens.
In the left-hand pane of the dialog box, click WSL.
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.
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.