【CI130x 离在线】Python使用import 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