/root/miniconda3/lib/python3.8/site-packages/librosa/core/audio.py:162: UserWarning: PySoundFile failed. Trying audioread instead. warnings.warn("PySoundFile failed. Trying audioread instead.")
时间: 2023-07-01 20:14:47 浏览: 243
这个警告是由Librosa库的audio.py文件中的代码引起的。该警告表明,在PySoundFile库无法使用的情况下,Librosa库将尝试使用audioread库来读取音频文件。PySoundFile库是Librosa库的一个可选依赖项,用于支持更多的音频文件格式。如果您的系统上没有安装PySoundFile,则Librosa库将使用audioread库来读取音频文件。您可以忽略这个警告,因为Librosa库仍然可以正常工作。如果您想解决这个警告,您可以安装PySoundFile库,方法是在终端中运行以下命令:pip install pysoundfile。然后,重新运行您的代码,这个警告应该不再出现了。
相关问题
WARNING: Target directory /root/miniconda3/lib/python3.8/site-packages/MarkupSafe-2.1.2.dist-info already exists. Specify --upgrade to force replacement. WARNING: Target directory /root/miniconda3/lib/python3.8/site-packages/markupsafe already exists. Specify --upgrade to force replacement. WARNING: Target directory /root/miniconda3/lib/python3.8/site-packages/jinja2 already exists. Specify --upgrade to force replacement. WARNING: Target directory /root/miniconda3/lib/python3.8/site-packages/Jinja2-3.1.2.dist-info already exists. Specify --upgrade to force replacement. WARNING: Target directory /root/miniconda3/lib/python3.8/site-packages/pcv already exists. Specify --upgrade to force replacement. WARNING: Target directory /root/miniconda3/lib/python3.8/site-packages/pcv-0.0.2.dist-info already exists. Specify --upgrade to force replacement. WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
这个警告提示是因为你正在以root用户的身份使用pip安装Python库,这可能会导致权限问题和与系统包管理器的冲突行为。为了避免这些问题,建议你使用虚拟环境来安装Python库。
你可以按照以下步骤来创建一个虚拟环境并在其中安装Python库:
1. 安装virtualenv:
```
pip install virtualenv
```
2. 在你的项目目录中创建一个虚拟环境:
```
virtualenv env
```
3. 激活虚拟环境:
```
source env/bin/activate
```
4. 在激活的虚拟环境中使用pip安装Python库,例如:
```
pip install package_name
```
5. 当你完成了虚拟环境中的工作,可以使用以下命令退出虚拟环境:
```
deactivate
```
通过使用虚拟环境,你可以避免权限问题和与系统包管理器的冲突行为,同时也可以更好地管理Python库的依赖关系。
make /usr/bin/python ./c_client.py -p //usr/lib/python3.8/site-packages //usr/share/xcb/xproto.xml /usr/bin/python ./c_client.py -p //usr/lib/python3.8/site-packages //usr/share/xcb/bigreq.xml /usr/bin/python ./c_client.py -p //usr/lib/python3.8/site-packages //usr/share/xcb/xc_misc.xml /usr/bin/python ./c_client.py -p //usr/lib/python3.8/site-packages //usr/share/xcb/composite.xml /usr/bin/python ./c_client.py -p //usr/lib/python3.8/site-packages //usr/share/xcb/damage.xml /usr/bin/python ./c_client.py -p //usr/lib/python3.8/site-packages //usr/share/xcb/dpms.xml /usr/bin/python ./c_client.py -p //usr/lib/python3.8/site-packages //usr/share/xcb/dri2.xml /usr/bin/python ./c_client.py -p //usr/lib/python3.8/site-packages //usr/share/xcb/glx.xml /usr/bin/python ./c_client.py -p //usr/lib/python3.8/site-packages //usr/share/xcb/randr.xml /usr/bin/python ./c_client.py -p //usr/lib/python3.8/site-packages //usr/share/xcb/record.xml /usr/bin/python ./c_client.py -p //usr/lib/python3.8/site-packages //usr/share/xcb/render.xml /usr/bin/python ./c_client.py -p //usr/lib/python3.8/site-packages //usr/share/xcb/res.xml /usr/bin/python ./c_client.py -p //usr/lib/python3.8/site-packages //usr/share/xcb/screensaver.xml /usr/bin/python ./c_client.py -p //usr/lib/python3.8/site-packages //usr/share/xcb/shape.xml /usr/bin/python ./c_client.py -p //usr/lib/python3.8/site-packages //usr/share/xcb/shm.xml /usr/bin/python ./c_client.py -p //usr/lib/python3.8/site-packages //usr/share/xcb/sync.xml /usr/bin/python ./c_client.py -p //usr/lib/python3.8/site-packages //usr/share/xcb/xevie.xml /usr/bin/python ./c_client.py -p //usr/lib/python3.8/site-packages //usr/share/xcb/xf86dri.xml /usr/bin/python ./c_client.py -p //usr/lib/python3.8/site-packages //usr/share/xcb/xfixes.xml /usr/bin/python ./c_client.py -p //usr/lib/python3.8/site-packages //usr/share/xcb/xinerama.xml /usr/bin/python ./c_client.py -p //usr/lib/python3.8/site-packages //usr/share/xcb/xinput.xml Traceback (most recent call last): File "./c_client.py", line 1039, in <module> module.register() File "/usr/lib/python2.7/dist-packages/xcbgen/state.py", line 93, in register matcher.execute(self, self.namespace) File "/usr/lib/python2.7/dist-packages/xcbgen/matcher.py", line 115, in execute funcs[elt.tag](elt, module, namespace) KeyError: 'eventstruct' make: *** [Makefile:1018: xinput.c] Error 1
这个错误是由于使用的是 Python 2.7 而不是 Python 3.x,导致在执行 c_client.py 脚本时出现了错误。您需要在命令行中使用正确的 Python 版本来运行该脚本。您可以尝试使用以下命令来运行该脚本:
```
python3 c_client.py -p /usr/lib/python3.8/site-packages /usr/share/xcb/xproto.xml
```
您需要将所有的命令都替换为类似的命令,以正确运行该脚本。
阅读全文