jupyter notebook中无法加载Ascend

问题描述:

问题是在terminal中运行:python -c "import mindspore;mindspore.set_device('Ascend');mindspore.run_check()" 就没问题,正常输出

但是在jupyter notebook中就报错,如下:

RuntimeError: Unsupported device target Ascend. This process only supports one of the ['CPU']. Please check whether the Ascend environment is installed and configured correctly, and check whether current mindspore wheel package was built with "-e Ascend". For details, please refer to "Device load error message". 

Load dynamic library: libmindspore_ascend.so.2 failed. libge_runner.so: cannot open shared object file: No such file or directory 

解决方法:

应该是jupyter 中缺少昇腾cann的那些环境变啦你给,这和jupyter的安装启动方式有关;

如果你在可以加载昇腾的终端里用pip方式安装了jupyter lab,然后用命令jupyter lab --no-browser --ip=0.0.0.0 --port=8080 --notebook-dir=/ --allow-root 这样启动,应该是没问题的;

但如果不是在你能加载昇腾的终端环境里直接安装的,或者其它方式启动了,或者额外单独配置了jupyter的环境变量,就可能加载不了昇腾,主要原因是,由于启动或者配置的不同,jupyter环境没有加载到昇腾cann那些环境变量,就无法搜索到cann的一些so文件,然后就会这样。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值