python/相关配置问题
主要是python的安装包,以及运行出现的问题
zx超
这个作者很懒,什么都没留下…
展开
-
parselmouth提取pitch,numpy 计算log能量
通过计算音高的平均值和标准差来分析说话人的性别和情感等信息,利用能量过滤背景人声。原创 2024-01-15 17:35:17 · 521 阅读 · 0 评论 -
python的logger日志
【代码】python的logger日志。原创 2024-02-18 10:02:04 · 393 阅读 · 1 评论 -
OSError: sndfile library not found
OSError: sndfile library not found这个提示是没有安装soundfile,与安装librosa版本没关系。librosa版本7以下的,在加载wav信息会很慢,需要7以上版本,因为他借用了sound file这个包。声音文件Python模块取决于本libsndfile机库。您需要在操作系统上安装它:pip install libsndfile...原创 2021-07-02 23:15:32 · 1689 阅读 · 5 评论 -
解决报错/usr/bin/env: ‘python’: No such file or directory
解决报错/usr/bin/env: ‘python’: No such file or directory一.启动某个程序报错/usr/bin/env: ‘python’: No such file or directory二.解决方法1.查看python3的版本python3 --version2.查找python3的安装位置:whereis python33.为其创建符号连接:sudo ln -s /usr/bin/python3 /usr/bin/python4.尝试再次启转载 2022-01-25 16:06:38 · 24461 阅读 · 3 评论 -
面试基础知识
原创 2021-12-11 21:29:40 · 76 阅读 · 0 评论 -
python 中super().__init__()
父类 class Person: def __init__(self, name='Person'): self.name=name def fun(self): print('其他函数')子类 class Puple(Person): pass class Puple_Init(Person): def __init__(self, age): self.age = age # 虽然继承了父原创 2021-09-15 21:49:39 · 651 阅读 · 0 评论 -
‘int‘ object is not callable
‘int’ object is not callable这个错误主要因为,你的当调用的时候出现冲突,以及关键字冲突,只需要关闭掉用不到的代码,就可以测试通过。原创 2021-05-03 13:07:05 · 777 阅读 · 0 评论 -
python读取音频的时长
import librosafilepath = “test.wav”d=librosa.get_duration(filename=filepath)print(d)原创 2021-04-19 16:56:43 · 1466 阅读 · 0 评论 -
pip安装出现Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: ‘
pip安装出现Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory:当from tensorflow.keras.layers import Conv2D,或者其他时,出现import keras …升高tensorflow2.2以上版本…这时候有两种方式,一、把tensorflow版本升到最高二、把keras降到合适的版本...原创 2021-04-18 22:25:18 · 276 阅读 · 0 评论 -
如何解释初始化的class
class student():定义构造方法def __init__(self, n=1, a=2): #__init__() 是类的初始化方法;它在类的实例化操作后 会自动调用,不需要手动调用;# 设置属性 self.name = n self.age = a定义普通方法def speak(self): print("%s 说:我今年%s岁" % (self.name, self.age))a=student()a.name输出:1a=student(3,4原创 2021-04-18 21:25:28 · 52 阅读 · 0 评论 -
[完美解决]Failed to get convolution algorithm. This is probably.......CUDA_ERROR_LAUNCH_FAIL
Failed to get convolution algorithm. This is probably because cuDNN failed to initialize, so try looking to see if a warning log message was printed above.当出现这个问题的时候,这大概就是你的显卡爆了,有两种方式解决:①可以关掉其他运行的代码,腾出一定空间,有可能解决问题,主要取决你的现在运行的代码用的显卡的大小。如果还报错,就继续下一步,也可以直接下原创 2021-03-20 12:27:59 · 906 阅读 · 1 评论 -
SyntaxError: Non-UTF-8 code starting with ‘\xa3‘ in file
SyntaxError: Non-UTF-8 code starting with '\xa3' in file原创 2021-03-08 15:56:41 · 1885 阅读 · 0 评论 -
Python中 __init__的通俗解释是什么?
Python中 __init__的通俗解释是什么?定义类的时候,若是添加__init__方法,那么在创建类的实例的时候,实例会自动调用这个方法,一般用来对实例的属性进行初使化。比如:class p1: def __init__(self, name, gender): //定义 __init__方法,这里有三个参数,这个self指的是一会创建类的实例的时候这个被创建的实例本身(例中的p1),你也可以写成其他的东西,比如写成name也是可原创 2021-03-03 21:39:38 · 260 阅读 · 1 评论 -
ValueError: You are trying to load a weight file containing 16 layers into a model with 19 layers.出错
ValueError: You are trying to load a weight file containing 16 layers into a model with 19 layers.像这些提示出的问题,其出错的真正原因是你的训练时候导入的模型不准确或者说你的导入的该模型的路径是错的。如何解决就是直接找到yml配置文件修改路径,即可。或者重新放置一个新的model。重新测试。。。。。...原创 2021-03-03 12:25:31 · 723 阅读 · 1 评论