音频处理 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实现的简单猜数字游戏
Apr 04 Python
python类和函数中使用静态变量的方法
May 09 Python
使用Python中的tkinter模块作图的方法
Feb 07 Python
numpy找出array中的最大值,最小值实例
Apr 03 Python
对DataFrame数据中的重复行,利用groupby累加合并的方法详解
Jan 30 Python
python如何实现数据的线性拟合
Jul 19 Python
Form表单及django的form表单的补充
Jul 25 Python
Python动态声明变量赋值代码实例
Dec 30 Python
浅谈tensorflow中张量的提取值和赋值
Jan 19 Python
Python安装OpenCV的示例代码
Mar 05 Python
Python生成随机验证码代码实例解析
Jun 09 Python
Python 分布式缓存之Reids数据类型操作详解
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
第1次亲密接触PHP5(2)
2006/10/09 PHP
PHP下几种删除目录的方法总结
2007/08/19 PHP
快速配置PHPMyAdmin方法
2008/06/05 PHP
CMS中PHP判断系统是否已经安装的方法示例
2014/07/26 PHP
php获取本周星期一具体日期的方法
2015/04/20 PHP
关于ThinkPhp 框架表单验证及ajax验证问题
2017/07/19 PHP
实现连缀调用的map方法(prototype)
2009/08/05 Javascript
JavaScript 类型的包装对象(Typed Wrappers)
2011/10/27 Javascript
JS实现div居中示例
2014/04/17 Javascript
浅析jQuery中调用ajax方法时在不同浏览器中遇到的问题
2014/06/11 Javascript
pace.js页面加载进度条插件
2015/09/29 Javascript
Bootstrap模块dropdown实现下拉框响应
2016/05/22 Javascript
Bootstrap插件全集
2016/07/18 Javascript
Bootstrap警告(Alerts)的实现方法
2017/03/22 Javascript
解析NodeJS异步I/O的实现
2017/04/13 NodeJs
聊聊那些使用前端Javascript实现的机器学习类库
2017/09/18 Javascript
vue.js将时间戳转化为日期格式的实现代码
2018/06/05 Javascript
vue项目中仿element-ui弹框效果的实例代码
2019/04/22 Javascript
javascript设计模式 ? 组合模式原理与应用实例分析
2020/04/14 Javascript
jquery实现简单自动轮播图效果
2020/07/29 jQuery
浅谈JavaScript中等号、双等号、 三等号的区别
2020/08/06 Javascript
python通过实例讲解反射机制
2019/10/17 Python
浅谈Python中的模块
2020/06/10 Python
python学习之使用Matplotlib画实时的动态折线图的示例代码
2021/02/25 Python
详解CSS3中的box-sizing(content-box与border-box)
2019/04/19 HTML / CSS
美国正版电视节目和电影在线观看:Hulu
2018/05/24 全球购物
Europcar西班牙:全球汽车租赁领域的领导者
2018/09/17 全球购物
安德玛菲律宾官网:Under Armour菲律宾
2020/07/28 全球购物
《太阳》教学反思
2014/02/21 职场文书
英语分层教学实施方案
2014/06/15 职场文书
卫生院艾滋病宣传活动小结
2014/07/09 职场文书
单位法定代表人授权委托书
2014/09/20 职场文书
毕业生自荐材料范文
2014/12/30 职场文书
2015年保育员个人工作总结
2015/05/13 职场文书
红色影片观后感
2015/06/18 职场文书
python中requests库+xpath+lxml简单使用
2021/04/29 Python