音频处理 windows10下python三方库librosa安装教程


Posted in Python onJune 20, 2020

librosa是处理音频库里的opencv,使用python脚本研究音频,先安装三方库librosa。

如下通过清华镜像源安装librosa;

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple librosa

D:\D00_Python3\D00A2_python3.7.3\install>pip install -i https://pypi.tuna.tsinghua.edu.cn/simple librosa
 
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Processing c:\users\administrator\appdata\local\pip\cache\wheels\6e\d3\47\7582e7e63ee9127f4773adeb8dcd8490771c063e2607354ba0\librosa-0.7.2-py3-none-any.whl
Requirement already satisfied: numba>=0.43.0 in d:\d00_python3\d00a2_python3.7.3\install\lib\site-packages (from librosa) (0.50.0)
Requirement already satisfied: joblib>=0.12 in d:\d00_python3\d00a2_python3.7.3\install\lib\site-packages (from librosa) (0.15.1)
Requirement already satisfied: resampy>=0.2.2 in d:\d00_python3\d00a2_python3.7.3\install\lib\site-packages (from librosa) (0.2.2)
Requirement already satisfied: numpy>=1.15.0 in d:\d00_python3\d00a2_python3.7.3\install\lib\site-packages (from librosa) (1.18.5)
Requirement already satisfied: audioread>=2.0.0 in d:\d00_python3\d00a2_python3.7.3\install\lib\site-packages (from librosa) (2.1.8)
Requirement already satisfied: scipy>=1.0.0 in d:\d00_python3\d00a2_python3.7.3\install\lib\site-packages (from librosa) (1.4.1)
Requirement already satisfied: soundfile>=0.9.0 in d:\d00_python3\d00a2_python3.7.3\install\lib\site-packages (from librosa) (0.10.3.post1)
Requirement already satisfied: scikit-learn!=0.19.0,>=0.14.0 in d:\d00_python3\d00a2_python3.7.3\install\lib\site-packages (from librosa) (0.23.1)
Requirement already satisfied: six>=1.3 in d:\d00_python3\d00a2_python3.7.3\install\lib\site-packages (from librosa) (1.15.0)
Requirement already satisfied: decorator>=3.0.0 in d:\d00_python3\d00a2_python3.7.3\install\lib\site-packages (from librosa) (4.4.2)
Requirement already satisfied: setuptools in d:\d00_python3\d00a2_python3.7.3\install\lib\site-packages (from numba>=0.43.0->librosa) (47.1.1)
Requirement already satisfied: llvmlite<0.34,>=0.33.0.dev0 in d:\d00_python3\d00a2_python3.7.3\install\lib\site-packages (from numba>=0.43.0->librosa) (0.33.0)
Requirement already satisfied: cffi>=1.0 in d:\d00_python3\d00a2_python3.7.3\install\lib\site-packages (from soundfile>=0.9.0->librosa) (1.14.0)
Requirement already satisfied: threadpoolctl>=2.0.0 in d:\d00_python3\d00a2_python3.7.3\install\lib\site-packages (from scikit-learn!=0.19.0,>=0.14.0->librosa) (2.1.0)
Requirement already satisfied: pycparser in d:\d00_python3\d00a2_python3.7.3\install\lib\site-packages (from cffi>=1.0->soundfile>=0.9.0->librosa) (2.20)
Installing collected packages: librosa
Successfully installed librosa-0.7.2
 
D:\D00_Python3\D00A2_python3.7.3\install>

pip list查看三方包:

D:\D00_Python3\D00A2_python3.7.3\install>pip list
Package       Version
-------------------- ------------
absl-py       0.9.0
astor        0.8.1
audioread      2.1.8
cffi         1.14.0
decorator      4.4.2
defusedxml      0.6.0
gast         0.3.3
google-pasta     0.2.0
grpcio        1.29.0
h5py         2.10.0
importlib-metadata  1.6.1
joblib        0.15.1
Keras-Applications  1.0.8
Keras-Preprocessing 1.1.2
librosa       0.7.2
llvmlite       0.33.0
Markdown       3.2.2
networkx       2.2
numba        0.50.0
numpy        1.18.5
pip         20.1.1
protobuf       3.12.2
pycparser      2.20
resampy       0.2.2
scikit-learn     0.23.1
scipy        1.4.1
setuptools      47.1.1
six         1.15.0
SoundFile      0.10.3.post1
tensorboard     1.14.0
tensorflow      1.14.0
tensorflow-estimator 1.14.0
termcolor      1.1.0
threadpoolctl    2.1.0
Werkzeug       1.0.1
wheel        0.34.2
wrapt        1.12.1
zipp         3.1.0
 
D:\D00_Python3\D00A2_python3.7.3\install>

如上

librosa ---- 0.7.2

numba-----0.50.0

下面使用librosa,报的是numba的错误!

D:\D00_Python3\D00A2_python3.7.3\install>python -c "import librosa"
Traceback (most recent call last):
 File "<string>", line 1, in <module>
 File "D:\D00_Python3\D00A2_python3.7.3\install\lib\site-packages\librosa\__init__.py", line 12, in <module>
  from . import core
 File "D:\D00_Python3\D00A2_python3.7.3\install\lib\site-packages\librosa\core\__init__.py", line 125, in <module>
  from .time_frequency import * # pylint: disable=wildcard-import
 File "D:\D00_Python3\D00A2_python3.7.3\install\lib\site-packages\librosa\core\time_frequency.py", line 11, in <module>
  from ..util.exceptions import ParameterError
 File "D:\D00_Python3\D00A2_python3.7.3\install\lib\site-packages\librosa\util\__init__.py", line 77, in <module>
  from .utils import * # pylint: disable=wildcard-import
 File "D:\D00_Python3\D00A2_python3.7.3\install\lib\site-packages\librosa\util\utils.py", line 15, in <module>
  from .decorators import deprecated
 File "D:\D00_Python3\D00A2_python3.7.3\install\lib\site-packages\librosa\util\decorators.py", line 9, in <module>
  from numba.decorators import jit as optional_jit
ModuleNotFoundError: No module named 'numba.decorators'
 
D:\D00_Python3\D00A2_python3.7.3\install>

解决办法:

卸载numba后,重新安装降版本的numba,安装numba==0.48.0

pip uninstall numba

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple numba==0.48.0

python -c "import librosa;print(librosa.__version__) "

可以看到成功安装了正确可使用的librosa库!

D:\D00_Python3\D00A2_python3.7.3\install>pip uninstall numba
Found existing installation: numba 0.50.0
Uninstalling numba-0.50.0:
 Would remove:
  d:\d00_python3\d00a2_python3.7.3\install\lib\site-packages\numba-0.50.0.dist-info\*
  d:\d00_python3\d00a2_python3.7.3\install\lib\site-packages\numba\*
  d:\d00_python3\d00a2_python3.7.3\install\scripts\numba
  d:\d00_python3\d00a2_python3.7.3\install\scripts\pycc
Proceed (y/n)? y
 Successfully uninstalled numba-0.50.0
 
D:\D00_Python3\D00A2_python3.7.3\install>pip install -i https://pypi.tuna.tsinghua.edu.cn/simple numba==0.48.0
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting numba==0.48.0
 Downloading https://pypi.tuna.tsinghua.edu.cn/packages/f5/ca/9e47464d388c3372454639d1739fa21605862c8815d53279e1216b5694e1/numba-0.48.0-cp37-cp37m-win_amd64.whl (2.1 MB)|?????????????????????????????? | 1.9 MB 2.2 MB/s eta 0:00:01   |?????????????????????????????? | 2.0 MB 2.2 MB/s eta 0:00:01   |??????????????????????????????? | 2.0 MB 2.2 MB/s eta 0:00:0   |??????????????????????????????? | 2.0 MB 2.2 MB/s eta 0:00:0   |????????????????????????????????| 2.1 MB 2.2 MB/s eta 0:00:    |????????????????????????????????| 2.1 MB 2.2 MB/s
Requirement already satisfied: setuptools in d:\d00_python3\d00a2_python3.7.3\install\lib\site-packages (from numba==0.48.0) (47.1.1)
Requirement already satisfied: numpy>=1.15 in d:\d00_python3\d00a2_python3.7.3\install\lib\site-packages (from numba==0.48.0) (1.18.5)
Collecting llvmlite<0.32.0,>=0.31.0dev0
 Downloading https://pypi.tuna.tsinghua.edu.cn/packages/1d/83/cd2843726a6316e372822e9e42cd0083b6d1d98d89d53880e7e67d5eec68/llvmlite-0.31.0-cp37-cp37m-win_amd64.whl (13.6 MB)
?????????????????????????????  | 12.1 MB 3.3 MB/s eta 0:00:01   |?????????????????????????????  | 12.5 MB 3.3 MB/s eta 0:00:01   |?????????????????????????????? | 12.9 MB 3.3 MB/s eta 0:00:0   |??????????????????????????????? | 13.1 MB 3.3 MB/s eta 0:00:    |????????????????????????????????| 13.6 MB 434 kB/s
Installing collected packages: llvmlite, numba
 Attempting uninstall: llvmlite
  Found existing installation: llvmlite 0.33.0
  Uninstalling llvmlite-0.33.0:
   Successfully uninstalled llvmlite-0.33.0
Successfully installed llvmlite-0.31.0 numba-0.48.0
 
 
D:\D00_Python3\D00A2_python3.7.3\install>python -c "import librosa;print(librosa.__version__) "
0.7.2

总结

到此这篇关于音频处理 windows10下python三方库librosa安装教程的文章就介绍到这了,更多相关音频处理python三方库librosa安装内容请搜索三水点靠木以前的文章或继续浏览下面的相关文章希望大家以后多多支持三水点靠木!

Python 相关文章推荐
python使用urllib模块开发的多线程豆瓣小站mp3下载器
Jan 16 Python
零基础学Python(一)Python环境安装
Aug 20 Python
Android模拟器无法启动,报错:Cannot set up guest memory ‘android_arm’ Invalid argument的解决方法
Jul 01 Python
Python利用Beautiful Soup模块修改内容方法示例
Mar 27 Python
Python获取当前页面内所有链接的四种方法对比分析
Aug 19 Python
开源软件包和环境管理系统Anaconda的安装使用
Sep 04 Python
解决python使用open打开文件中文乱码的问题
Dec 29 Python
python matplotlib 注释文本箭头简单代码示例
Jan 08 Python
Python设计模式之备忘录模式原理与用法详解
Jan 15 Python
Keras设置以及获取权重的实现
Jun 19 Python
python缩进长度是否统一
Aug 02 Python
Python开发工具Pycharm的安装以及使用步骤总结
Jun 24 Python
深入浅析python 中的self和cls的区别
Jun 20 #Python
浅谈Python 参数与变量
Jun 20 #Python
python字符串的index和find的区别详解
Jun 20 #Python
Django Admin 上传文件到七牛云的示例代码
Jun 20 #Python
什么是python的函数体
Jun 19 #Python
浅谈Python中的生成器和迭代器
Jun 19 #Python
python中有帮助函数吗
Jun 19 #Python
You might like
关于PHP中的Class的几点个人看法
2006/10/09 PHP
php对数组排序代码分享
2014/02/24 PHP
用Javascript实现Windows任务管理器的代码
2012/03/27 Javascript
原生Js实现元素渐隐/渐现(原理为修改元素的css透明度)
2013/06/24 Javascript
控制台报错object is not a function的解决方法
2014/08/24 Javascript
javascript中clipboardData对象用法详解
2015/05/13 Javascript
Jquery和angularjs获取check框选中的值的方法汇总
2016/01/17 Javascript
JS弹出窗口插件zDialog简单用法示例
2016/06/12 Javascript
Javascript动画效果(2)
2016/10/11 Javascript
JavaScript中匿名函数的递归调用
2017/01/22 Javascript
详解Angular.js数据绑定时自动转义html标签及内容
2017/03/30 Javascript
nodeJS(express4.x)+vue(vue-cli)构建前后端分离实例(带跨域)
2017/07/05 NodeJs
layui获取多选框中的值方法
2018/08/15 Javascript
监控微信小程序中的慢HTTP请求过程详解
2019/07/05 Javascript
layui 对table中的数据进行转义的实例
2019/09/12 Javascript
layui文件上传控件带更改后数据传值的方法
2019/09/23 Javascript
原生javascript实现类似vue的数据绑定功能示例【观察者模式】
2020/02/24 Javascript
Python实现向QQ群成员自动发邮件的方法
2014/11/19 Python
以视频爬取实例讲解Python爬虫神器Beautiful Soup用法
2016/01/20 Python
Python tornado队列示例-一个并发web爬虫代码分享
2018/01/09 Python
手把手教你Python yLab的绘制折线图的画法
2019/10/23 Python
python FTP编程基础入门
2021/02/27 Python
Marks & Spencer爱尔兰:英国马莎百货
2016/04/20 全球购物
英国百安居装饰建材网上超市:B&Q
2016/09/13 全球购物
JAVA和C++区别都有哪些
2015/03/30 面试题
技术总监的工作职责
2013/11/13 职场文书
生产厂厂长岗位职责
2013/12/25 职场文书
管理心得体会
2013/12/28 职场文书
食堂采购员岗位职责
2014/03/17 职场文书
电视购物广告词
2014/03/19 职场文书
大学学生会竞选演讲稿
2014/04/25 职场文书
2014政府领导班子对照检查材料思想汇报(3篇)
2014/09/26 职场文书
党的群众路线教育实践活动查摆问题及整改措施
2014/10/10 职场文书
2014最新党员违纪检讨书
2014/10/12 职场文书
债务追讨授权委托书范本
2014/10/16 职场文书
Java实现简单小画板
2022/06/10 Java/Android