Skip to content
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

Python 3 support #17

Open
betab0t opened this issue Dec 22, 2019 · 1 comment
Open

Python 3 support #17

betab0t opened this issue Dec 22, 2019 · 1 comment

Comments

@betab0t
Copy link

betab0t commented Dec 22, 2019

I'm trying to build playerc binding for Python 3, everything is done inside venv and seems to build successfully but when I try to import from playerc I'm getting the following error:

Python 3.6.9 (default, Nov  7 2019, 10:44:02)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from playerc import *
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/playerc.py", line 14, in swig_import_helper
    return importlib.import_module(mname)
  File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 658, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 571, in module_from_spec
  File "<frozen importlib._bootstrap_external>", line 922, in create_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
ImportError: /usr/local/lib/python3.6/site-packages/_playerc.so: undefined symbol: PyBuffer_FromMemory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.6/site-packages/playerc.py", line 17, in <module>
    _playerc = swig_import_helper()
  File "/usr/local/lib/python3.6/site-packages/playerc.py", line 16, in swig_import_helper
    return importlib.import_module('_playerc')
  File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
ImportError: /usr/local/lib/python3.6/site-packages/_playerc.so: undefined symbol: PyBuffer_FromMemory```
@betab0t
Copy link
Author

betab0t commented Dec 22, 2019

Seems like SWIG built python2 version of playerc binding, but I can't find anywhere how to force it to build for Python 3... any advice?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant