Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/326.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 在OS X 10.10下的PyCharm中使用VirtualBox设置Vagrant时出错_Python_Macos_Vagrant_Virtualbox_Pycharm - Fatal编程技术网

Python 在OS X 10.10下的PyCharm中使用VirtualBox设置Vagrant时出错

Python 在OS X 10.10下的PyCharm中使用VirtualBox设置Vagrant时出错,python,macos,vagrant,virtualbox,pycharm,Python,Macos,Vagrant,Virtualbox,Pycharm,设置远程解释器并选择Vagrant时,我在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 V

设置远程解释器并选择Vagrant时,我在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
现在,从一个终端,一切工作。我可以在虚拟机中进行“up”和ssh操作,而不会出现问题。转发端口和本地文件。因此,这个问题只存在于PyCharm中。我已经安装了Java1.8

路径为:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

哪个VBoxManage:/usr/local/bin/VBoxManage在终端中工作

注意,这是今天早上完成的OSX的新安装。
Vagrant版本是1.7.3,VirtualBox版本是4.3.30,PyCharm版本是4.5.3。事实证明,这个问题是PyCharm中的一个已知错误

在他们修复之前,您可以通过使用
charm
命令从终端窗口启动PyCharm来绕过问题

另一种解决方法:

sudo ln -s /usr/local/bin/VBoxManage /usr/bin/VBoxManage
编辑:

由于这一切都在一段时间前起了作用,因此导致此问题的原因必须是以下之一:

  • VirtualBox的更新更改了其可执行文件的位置
  • 或更新已更改的路径设置/IDE的可执行位置预期

无论原因是什么,解决方案都是确保VBoxManage位于PyCharm期望的位置。我没有自己设计这个解决方案,只是在谷歌上搜索了一下,但是因为它非常漂亮和干净,我决定将它添加到这里。

这帮助我解决了这个问题:

我可以在我的vagrant文件所在的位置调用此命令:

vagrant plugin update vagrant-parallels
此外,此链接还为python路径添加了一些帮助


对于他们的另一个IDE,如Rubymine和PhpStorm,似乎也是如此。对于那些没有新安装4.5.3版本(来自升级)的用户,您应该转到工具>创建命令行启动器以创建“charm”命令并着手解决问题。感谢themaxx,和danigosa,提醒您如何更新charm命令。我刚刚花了2个小时试图弄清楚这一点,我认为这是由升级到vagrant 1.7.4和virtualbox 5引起的。您可能想进一步说明为什么这会有帮助。谢谢,这是一个简单的修复(对我来说)。谢谢,你的链接是404'd@electrometro好吧,我猜那页已经过去或移动了。我已经删除了那个链接。