【C130x 离在线】Python使用import opuslib 报错解决方案

背景

最近在用 CI130X 离在线的SDK测试串口采音(采用Opus压缩),然后用 deepSeek 写了一段 python 测试脚本;

由于采集得到的是Opus格式的数据,最后生成的文件也是 Opus 格式的文件,因此需要写一个脚本进行解码,其中用到了 opuslib 库。

一、下载opuslib库

1、先在命令行cd到自己Python所在目录路径

2、运行以下指令

python.exe -m pip install opuslib

二、运行代码出现错误

raise Exception(
        'Could not find Opus library. Make sure it is installed.')
Exception: Could not find Opus library. Make sure it is installed.

三、解决方案--下载opus.dll文件

1、 下载链接:Releases · ShiftMediaProject/opus

image

2、解压找到 XXX\libopus_v1.4_msvc17\bin\x64 目录下的opus.dll文件并复制

3、粘贴到C:\Windows\System32目录下

4、运行代码发现不会继续报错,大功告成!

 

 

转载自:

https://blog.csdn.net/m0_72838674/article/details/148142608

posted @ 2025-11-03 23:25  FBshark  阅读(0)  评论(0)    收藏  举报