PyOgg icon indicating copy to clipboard operation
PyOgg copied to clipboard

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

Open tamis-laan opened this issue 1 year ago • 5 comments

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

tamis-laan avatar Jul 10 '24 09:07 tamis-laan

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

sidharthrajaram avatar Jul 11 '24 23:07 sidharthrajaram

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'?

cklam12345 avatar Sep 24 '24 08:09 cklam12345

@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

kalradivyanshu avatar Oct 07 '24 17:10 kalradivyanshu

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

santiarr avatar Nov 03 '24 20:11 santiarr

https://github.com/TeamPyOgg/PyOgg/issues/113#issuecomment-2585724522

ozanyurt avatar Jan 12 '25 12:01 ozanyurt