Configure an interpreter using Vagrant
Configure a remote Python interpreter
Ensure that the following prerequisites are met (outside of PyCharm):
One of supported Vagrant providers 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 have been added to the system
vagrant.bat or vagrant from your Vagrant installation. This should be done automatically by the installer.
VBoxManage.exe or VBoxManage from your Oracle's VirtualBox installation.
The required virtual boxes are created.
Make sure that the Vagrant plugin is enabled.
Ensure that you have properly initiated and started Vagrant. Basically, you need to open the Terminal window and execute the following commands:$ vagrant init ubuntu/trusty64
and$ vagrant up
See Vagrant documentation for more information.
Do one of the following:
Click the Python Interpreter selector and choose Add New Interpreter.
Press Ctrl+Alt+S to open Settings and go to . Click the Add Interpreter link next to the list of the available interpreters.
Click the Python Interpreter selector and choose Interpreter Settings. Click the Add Interpreter link next to the list of the available interpreters.
Select On Vagrant.
Specify the path to the Vagrant instance folder in Vagrant Instance Folder.
Wait until you see a link in Vagrant Host URL.
In the New Target: Vagrant dialog, click the browse icon next to the Vagrant Instance Folder field, and specify the desired Vagrant instance folder.
This results in showing the link to Vagrant Host URL.
In the next field, PyCharm will display the path to the Python executable. Press "Next" to proceed.
You can create a virtual environment (venv or conda) or use a system Python interpreter for the target Vagrant instance. Note that virtual environment must be configured and available in the specified Vagrant instance folder. Otherwise, the corresponding lists will be empty.
Clik Create to complete the task.