Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error setting up Vagrant with VirtualBox in PyCharm under OS X 10.10

When setting up the remote interpreter and selecting Vagrant, I get the following error in PyCharm:

Can't Get Vagrant Settings: [0;31mThe provider 'virtualbox' that was requested to back the machine 'default' is reporting that it isn't usable on this system. The reason is shown bellow: Vagrant could not detect VirtualBox! Make sure VirtualBox is properly installed. Vagrant uses the `VBoxManage` binary that ships with VirtualBox, and requires this to be available on the PATH. If VirtualBox is installed, please find the `VBoxManage` binary and add it to the PATH environment variable.[0m

Now, from a terminal, everything works. I can do 'up' and ssh into the VM without issues. Ports are forwarded as well as local files. So the issue is only in PyCharm. I have installed Java 1.8

PATH is: /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

which VBoxManage: /usr/local/bin/VBoxManage and works in terminal.

Note that this is a fresh install of OS X done this morning. Vagrant version is 1.7.3, VirtualBox is 4.3.30 and PyCharm is 4.5.3

like image 790
Max Lap Avatar asked Jul 13 '15 23:07

Max Lap


2 Answers

Another workaround:

sudo ln -s /usr/local/bin/VBoxManage /usr/bin/VBoxManage

Edit:

Since it all worked some time ago, one of the following has to be cause of this problem:

  • either update of VirtualBox changed location of it's executable
  • or update of PyCharm changed PATH settings / executable location expectation for the IDE

Whatever the cause is, the solution is to make sure VBoxManage is in location expected by PyCharm. I haven't make up this solution myself, just googled it, but because it is so nice and clean I decided to add it here.

like image 161
Luigi Avatar answered Nov 19 '22 19:11

Luigi


Turns out, this problem is a known bug in PyCharm.

Until they fix it, you can get around the problem by launching PyCharm from a terminal window with the charm command.

Vagrant 1.7.3 and VirtualBox 4.3.30 under Pycharm 4.5: Path issue

like image 23
Max Lap Avatar answered Nov 19 '22 18:11

Max Lap