6
votes

I am running some Python code from a virtual machine but I want to use Eclipse/PyDev as an IDE on the host machine. Is there a way to configure Eclipse so that it will use the Python interpreter and the packages of the virtual machine? Those are different from the ones installed on the host machine. Also, I am not sure on how to have access to the Python interpreter on the virtual machine. I am using a mod version of Ubuntu on Virtual Box.

2

2 Answers

0
votes

If both machines are in the same OS or near, you can:

  • Mount the file system of the hosted into the host.
  • Go to Eclipse preferences => PyDev => Interpreter - Python => new
  • Get the Python executable on the mounted filesystem
  • Validate

  • Go to properties of your project

  • Pydev - Interpreter/Gramar
  • Select the newly created interpreter.

You may check for virtualenv if you want to work with the virtual machine down.

0
votes

You can use remote debugging when VM python interpreter connecting to your host IDE python debugger. They are communicating and IDE warn VM interpreter about breakpoints.

Note: source on IDE side should be the same as on VM otherwise breakpoints would be misplaced.