New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dynamic module does not define module export function (PyInit_VBoxPython3_5m) #102
Comments
Thanks for opening this issue, I'll take a quick look at the 5.2.4 SDK. |
It looks like it's finding VBoxPython, when you installed your SDK did you use Python 3.5 or Python 2.7? You should install it with the Python version you want to use it with. |
thank you for answer am not use virtualenv, Debian 9.3 already have python3 3.5.3 version, but system version is Python 2.7.13, am want use python3 for virtualbox management am install virtualbox from deb package which am get from official virtualbox repository, then am download and unzip to /tmp VirtualBox sdk |
Thanks for the setup steps. I'll take a look at this later as I don't have Debian 9.3 in front of me. |
am have same issue with ubuntu 16.04 (looks same but maybe different in details if needed am could install ubuntu 16.04 and open new issue) maybe you could provide information about linux distro which already tested with python3.5+ and virtualbox ? |
Well I develop VirtualBox using 3.5 and 3.6 on Windows and Ubuntu so Ubuntu should work properly. I'll install a fresh environment and try it out. :) If you could provide the exact steps you took for the Ubuntu environment as well that would be appreciated! |
Also: try installing pyvbox with |
am have same issue with vboxapi
|
What does this print out after you install import virtualbox
v = virtualbox.VirtualBox()
v.find_machine('MACHINE NAME') |
steps for clean 14.04
|
So it's finding your VBoxPython3_4m installation it's just erroring out when it tries to import it with this message:
|
Can you try uninstalling your Python 2.7 install of VBoxPython and installing only 3.*? |
yeap am have same issue with 3.5 at debian 9.3
|
My guess here is that for some reason the VBoxPython3_*m.so modules don't actually define |
which version of ubuntu you use ? am try it right now .) |
Can you run |
debian 9.3
ubuntu 14.04
(nothing) |
So it does define it... hm... I'll have to take a look at this more later. Thanks for helping out. |
debian 9.3 exception contains
but in file another name of function (needed PyInit_VBoxPython3_5m but it contains PyInit_VBoxPython3_5)
|
khm am try this dirty hack
and it works for me in same env (debian 9.3 + python 3.5.3 + virtualbox 5.2.4r119785 and virtualbox sdk 5.2.4r119785)
|
Hey nice catch! Looks like Virtualbox named the .so module wrong somewhere? Maybe I'll investigate being able to package all of these together so that this doesn't happen in the future. Looks like the |
yes, am think so
|
That's a good source. We can maybe work around this by packaging VBoxPython or emitting a better error. |
I opened a defect with VirtualBox: https://www.virtualbox.org/ticket/17448 |
Same issue on Ubuntu 20.04 with python 3.8.10
|
Same issue on Ubuntu 20.04.5 LTS with python 3.9.13
And result of
|
I no longer have time to maintain this library, so am closing this issue. |
ENVIRONMENT
SUMMARY
could not use python3.5 with pyvbox (but this is donot issue of pyvbox, am have same error with pure vboxapi)
am have not any problem with use python2.7 on same host
maybe you could help with this ?
STEPS TO REPRODUCE
import virtualbox
virtualbox.VirtualBox()
EXPECTED RESULTS
<virtualbox.library_ext.vbox.IVirtualBox object at 0x7f6e3219a210>
ACTUAL RESULTS
m=VBoxPython3_5m x=dynamic module does not define module export function (PyInit_VBoxPython3_5m)
m=VBoxPython3m x=No module named 'VBoxPython3m'
m=VBoxPython x=/usr/lib/virtualbox/VBoxPython.so: undefined symbol: _Py_ZeroStruct
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python3.5/dist-packages/virtualbox/library_ext/vbox.py", line 22, in init
manager = virtualbox.Manager()
File "/usr/local/lib/python3.5/dist-packages/virtualbox/init.py", line 137, in init
self.manager = vboxapi.VirtualBoxManager(mtype, mparams)
File "/usr/local/lib/python3.5/dist-packages/vboxapi/init.py", line 989, in init
self.platform = PlatformXPCOM(dPlatformParams)
File "/usr/local/lib/python3.5/dist-packages/vboxapi/init.py", line 750, in init
import xpcom.vboxxpcom
File "/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/vboxxpcom.py", line 78, in
raise Exception('Cannot find VBoxPython module (tried: %s)' % (', '.join(_asVBoxPythons),))
Exception: Cannot find VBoxPython module (tried: VBoxPython3_5m, VBoxPython3m, VBoxPython)
The text was updated successfully, but these errors were encountered: