You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Conda虚拟环境中Python代码提示‘sox’未识别的问题求助

Python sox库运行报错:'sox' 不是内部或外部命令

我用Conda创建了名为my_venv的虚拟环境,通过pip安装了GitHub克隆项目的requirements.txt文件,其中包含sox库。从截图可确认sox已安装成功,在anaconda3/envs/my_venv/Lib/site-packages路径下存在sox-1.4.1.dist-info和sox两个文件夹,我已将这两个文件夹添加至系统路径。

但在虚拟环境中运行以下Python代码时:

import sox
# 获取采样率
tfm = sox.Transformer()
tfm.trim(5, 10.5)
tfm.compand()
# 应用淡入淡出效果
tfm.fade(fade_in_len=1.0, fade_out_len=0.5)

出现无法解决的错误:

'sox' is not recognized as an internal or external command,
operable program or batch file.
SoX could not be found!
If you do not have SoX, proceed here:

      • http://sox.sourceforge.net/ - - -
        If you do (or think that you should) have SoX, double-check your
        path variables.

附上安装包及sox文件的截图:
已安装的包
已安装的sox文件

内容的提问来源于stack exchange,提问作者Yalçın Cenik

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.05 12:20:57