首页 > 其他分享 >import mindnlp报错:OSError: cannot load library ‘libsndfile.so‘: libsndfile.so: cannot open shared obj

import mindnlp报错:OSError: cannot load library ‘libsndfile.so‘: libsndfile.so: cannot open shared obj

时间:2024-10-10 12:47:01浏览次数:3  
标签:libsndfile https cannot so install 报错 mindnlp

在启智平台AI调试环境下,安装mindnlp后,import mindnlp报错。

安装mindnlp命令:

#安装mindnlp的daily包,待正式发布后可改为直接安装mindnlp包
!pip install https://mindspore-courses.obs.cn-north-4.myhuaweicloud.com/mindnlp/mindnlp-0.4.0-py3-none-any.whl -i https://pypi.tuna.tsinghua.edu.cn/simple
# !pip install mindnlp==0.4.0
!pip install jieba -i https://pypi.tuna.tsinghua.edu.cn/simple
!pip install tiktoken -i https://pypi.tuna.tsinghua.edu.cn/simple
%env HF_ENDPOINT=https://hf-mirror.com

import mindnlp报错信息:


[WARNING] ME(106:281472992808976,MainProcess):2024-10-10-01:21:04.337.056 [mindspore/hal/device.py:155] Backend Ascend is not created yet.
[WARNING] ME(106,ffff89c01010,python):2024-10-10-01:21:04.336.789 [mindspore/ccsrc/runtime/hardware/device_context_manager.cc:466] GetDeviceContext] Device context of device Ascend is not created yet.
---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
File /home/ma-user/anaconda3/envs/MindSpore/lib/python3.9/site-packages/soundfile.py:161
    159     raise OSError('no packaged library for this platform')
--> 161 import _soundfile_data  # ImportError if this doesn't exist
    162 _path = _os.path.dirname(_soundfile_data.__file__)  # TypeError if __file__ is None

ModuleNotFoundError: No module named '_soundfile_data'

During handling of the above exception, another exception occurred:
OSError: cannot load library 'libsndfile.so': libsndfile.so: cannot open shared object file: No such file or directory


解决问题:

看到PaddleSpeech有个issue:https://github.com/PaddlePaddle/PaddleSpeech/issues/3044
说参考这个issue:https://github.com/PaddlePaddle/PaddleSpeech/issues/440
提示:
libsndfile.so 安装目录是在“/usr/local/lib”下面,检查一下你的“LD_LIBRARY_PATH”是否包含这个目录,如果没有就export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH,再尝试运行一下。

问题是这个系统里根本就没有libsndfile这个库,

ls /usr/local/lib发现该目录下没东西。而且启智没法用pkg安装包。

pkg search wget
sh: pkg: command not found

原来启智用的系统是EulerOS ,包管理软件是yum ,于是用yum来安装libsndfile包:

yum install libsndfile


这样报错问题解决。

标签:libsndfile,https,cannot,so,install,报错,mindnlp
From: https://blog.csdn.net/skywalk8163/article/details/142818646

相关文章

  • PCL rpath解决so动态库依赖
    依赖库搜索流程动态库或可执行文件,是如何找到它所依赖的库的?是按以下目录顺序来搜索:theRPATHbinaryheader(setatbuild-time)ofthelibrarycausingthelookup(ifany)theRPATHbinaryheader(setatbuild-time)oftheexecutabletheLD_LIBRARY_PATH......
  • Microsoft Expression Studio 4 MSDN中文旗舰版
    MicrosoftExpressionStudio4MSDN中文旗舰版复制   slice UID79171帖子5494PB币19816贡献0技术64活跃1938   楼主 发表于2010-10-1021:42:52 IP属地重庆本帖最后由slice于2010-10-1021:47编辑cn_expression_st......
  • 12G-SDI高清视频开发案例,让4K视频采集更便捷!基于Xilinx MPSoC高性能平台
    本文主要介绍基于XilinxUltraScale+MPSoCXCZU7EV的12G-SDI高清视频开发案例,适用开发环境如下:Windows开发环境:Windows764bit、Windows1064bitLinux开发环境:Ubuntu18.04.464bit开发工具包:XilinxUnified2022.2硬件平台:创龙科技TLZU-EVM评估板(基于XilinxUltraScale+......
  • HarmonyOS开发——编译报错“The reason and usedScene attributes are mandatory for
    问题现象:DevEcoStudio编译失败,提示“ThereasonandusedSceneattributesaremandatoryforuser_grantpermissions”。问题原因:从DevEcoStudioNEXTDeveloperPreview2版本开始新增规则:APP包中,所有entry和featurehap的module下的requestPermissions权限清单必须指定(......
  • python程序停到这个地方 client_socket, address = server_socket.accept()
    停到这个地方 client_socket,address=server_socket.accept() 这行代码是在等待客户端的连接请求。server_socket.accept()是一个阻塞调用,它会一直等待有客户端连接上来,然后返回一个新的套接字对象client_socket和客户端的地址address。如果你的程序在这一行停止,可能......
  • Linux网络(二)——socket、BIO、epoll原理
    二、内核如何与用户进程协作//创建Socket的c语言程序...intmain(){ intsk=socket(PF_INET,SOCK_STREAM,0); //忽略bind和accept ... } 2.1读取视角:Linuxsocket结构2.1.1socket源码//代码:/include/linux/net.hstructsocket{ socket_state state; shor......
  • C# Json操作
    usingNewtonsoft.Json;usingNewtonsoft.Json.Linq;usingSystem;usingSystem.Collections.Generic;usingSystem.IO;usingSystem.Linq;usingSystem.Runtime.Serialization.Json;usingSystem.Text;usingSystem.Web.Script.Serialization;namespaceHS.Common.......
  • OpenSource - License 开源项目 TrueLicense
    文章目录官网集成Demo官网https://truelicense.namespace.global/https://github.com/christian-schlichtherle/truelicense集成Demohttps://github.com/christian-schlichtherle/truelicense-maven-archetypehttps://github.com/zifangsky/LicenseDemohttp......
  • 自动化测试 | 安装selenium教程以及(ERROR: pip‘s dependency resolver does not cur
    1.在cmd里面安装selenium输入:pipinstallselenium在我这里出现了下载缓慢的问题,一直卡了半天,有同样问题的小伙伴可以试试输入下面这个进行安装,会更快一点:pip--default-timeout=100installselenium-ihttps://pypi.tuna.tsinghua.edu.cn/simple之后仍然出现了:ERRO......
  • 深度学习No module named ‘torchvision.transforms.functional_tensor‘问题解决
    问题在进行深度学习训练过程中出现ModuleNotFoundError:Nomodulenamed'torchvision.transforms.functional_tensor'报错,多方查阅资料后得到了解决方案。关于我的环境:CUDA==12.1torch==2.4.1GPU==4090D原先进行深度学习用的CUDA11.3,torch1.2.1,但是在训练时出现nvrtc......