Configuring Remote Interpreters via Virtual Boxes
In this section:
Before you start working with Vagrant, make sure that Vagrant plugin is enabled.
The plugin is bundled with PyCharm and activated by default.
If not, enable the plugin as described in Enabling and Disabling Plugins.
Besides that, make sure that the following prerequisites are met (outside of PyCharm):
- Oracle's VirtualBox is installed on your computer.
- Vagrant is installed on your computer, and all the necessary infrastructure is created.
- The parent folders of the following executable files are added to the system PATH variable:
vagrantfrom your Vagrant installation. This should be done automatically by the installer.
VBoxManagefrom your Oracle's VirtualBox installation.
Configuring remote Python interpreter via Vagrant
To configure a remote Python interpreter
- In the Project Interpreters page of the Settings dialog box, click .
- In the drop-down list, choose
The dialog box Configure Remote Python Interpreter opens..
- In this dialog box, click the radio button Vagrant:
In this case, the remote server settings are taken from the vagrant configuration file, defined in the page Vagrant.
- Do the following:
- Click the browse button next to the field Vagrant Instance Folder,
and specify the desired Vagrant instance folder.
This will result in showing the link to Vagrant host URL.
- The Python interpreter path field displays the path to the desired Python executable. You can accept default, or specify a different one.
- Click the browse button next to the field Vagrant Instance Folder, and specify the desired Vagrant instance folder.
- Click OK in the Configure Remote Python Interpreter dialog box. The configured remote interpreter is added to the list.