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

ImportError: cannot import name 'OpusDecoder' from 'pyogg' #109

Open
tamis-laan opened this issue Jul 10, 2024 · 4 comments
Open

ImportError: cannot import name 'OpusDecoder' from 'pyogg' #109

tamis-laan opened this issue Jul 10, 2024 · 4 comments

Comments

@tamis-laan
Copy link

tamis-laan commented Jul 10, 2024

Simply trying to import the OpusDecoder as specified in the docs:

from pyogg import OpusDecoder

results in:

ImportError: cannot import name 'OpusDecoder' from 'pyogg'

I'm on linux and the latest version PyOgg==0.6.14a1

@sidharthrajaram
Copy link

Encountered the same issue. You need to install from source like:
pip install git+https://github.com/TeamPyOgg/PyOgg

@cklam12345
Copy link

Traceback (most recent call last):
File "", line 1, in
PyOgg-master/pyogg/init.py", line 6, in
from .opus import PYOGG_OPUS_AVAIL, PYOGG_OPUS_FILE_AVAIL, PYOGG_OPUS_ENC_AVAIL
PyOgg-master/pyogg/opus.py", line 437, in
libopus.opus_encoder_create.argtypes = [opus_int32, c_int, c_int, c_int_p]
^^^^^^^
NameError: name 'c_int_p' is not defined. Did you mean: 'c_int'?

@kalradivyanshu
Copy link

@cklam12345 c_int_p is defined in libopus, you need to install all the dependencies:

sudo apt install libogg-dev libopusenc-dev libflac-dev libopusfile-dev libopus-dev libvorbis-dev

@santiarr
Copy link

santiarr commented Nov 3, 2024

Traceback (most recent call last): File "", line 1, in PyOgg-master/pyogg/init.py", line 6, in from .opus import PYOGG_OPUS_AVAIL, PYOGG_OPUS_FILE_AVAIL, PYOGG_OPUS_ENC_AVAIL PyOgg-master/pyogg/opus.py", line 437, in libopus.opus_encoder_create.argtypes = [opus_int32, c_int, c_int, c_int_p] ^^^^^^^ NameError: name 'c_int_p' is not defined. Did you mean: 'c_int'?

bump

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

5 participants