Opened 5 years ago

#18366 new defect

Can't use vboxapi on Mac using Python bindings with anything other than the system version of Python

Reported by: keeely Owned by:
Component: other Version: VirtualBox 6.0.2
Keywords: sdk python Cc:
Guest type: other Host type: Mac OS X


Version 6.0.2 r128162 (Qt5.6.3)

When I installed VirtualBox it seems to have setup Python bindings to the system Python version on Mojave of 2.7.10.

I have installed the sdk for python 2.7.15 and 3.7 with: cd /Applications/ sudo VBOX_INSTALL_PATH=/Applications/ /usr/local/bin/python2 install sudo VBOX_INSTALL_PATH=/Applications/ python3 install

The installation appears to complete correctly for both python2.7.15 and python3.7.0. However my test program only works for the built-in python 2.7.10 (/usr/bin/python).

My test Python program is:

from vboxapi import VirtualBoxManager mgr = VirtualBoxManager(None, None)

On built-in Mojave Python version, execution is without error (/usr/bin/python

On brew-installed Python 2 (/usr/local/bin/python2, I get: Segmentation fault: 11

On python 3.7.0 (python3 get: m=VBoxPython3_7m x=No module named 'VBoxPython3_7m' m=VBoxPython3m x=No module named 'VBoxPython3m' m=VBoxPython x=No module named 'VBoxPython' Traceback (most recent call last):

File "", line 2, in <module>

mgr = VirtualBoxManager(None, None)

File "/usr/local/lib/python3.7/site-packages/vboxapi/", line 989, in init

self.platform = PlatformXPCOM(dPlatformParams)

File "/usr/local/lib/python3.7/site-packages/vboxapi/", line 750, in init

import xpcom.vboxxpcom

File "/Applications/", line 78, in <module>

raise Exception('Cannot find VBoxPython module (tried: %s)' % (', '.join(_asVBoxPythons),))

Exception: Cannot find VBoxPython module (tried: VBoxPython3_7m, VBoxPython3m, VBoxPython)

Change History (0)

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use