-1

当我尝试aesim.simba在 Jupyter 笔记本(我有 Ubuntu budgie 21.10 作为操作系统)中导入(电力电子包)时,出现以下错误

import aesim.simba

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-2ec74653cfe4> in <module>
----> 1 import aesim.simba

~/anaconda3/lib/python3.7/site-packages/aesim/simba/__init__.py in <module>
      1 #%% Load modules...
----> 2 import clr, sys, os
      3 
      4 foldername = os.path.join(os.path.dirname(os.path.abspath(__file__)),'Resources')
      5 sys.path.append(foldername)

ImportError: System.DllNotFoundException: libdl.so
  at (wrapper managed-to-native) Python.Runtime.NativeMethods.dlerror()
  at Python.Runtime.NativeMethods.GetProcAddress (System.IntPtr dllHandle, System.String name) [0x00014] in <8dd8fc13f92f45c99ad71297a6b63b31>:0 
  at Python.Runtime.Runtime.Initialize (System.Boolean initSigs) [0x00263] in <8dd8fc13f92f45c99ad71297a6b63b31>:0 
  at Python.Runtime.PythonEngine.Initialize (System.Collections.Generic.IEnumerable`1[T] args, System.Boolean setSysArgv, System.Boolean initSigs) [0x00014] in <8dd8fc13f92f45c99ad71297a6b63b31>:0 
  at Python.Runtime.PythonEngine.Initialize (System.Boolean setSysArgv, System.Boolean initSigs) [0x00005] in <8dd8fc13f92f45c99ad71297a6b63b31>:0 
  at Python.Runtime.PythonEngine.InitExt () [0x00000] in <8dd8fc13f92f45c99ad71297a6b63b31>:0 

我是 Linux 世界的新手。谁能告诉我如何解决这个问题以及如何aesim.simba正确导入?

4

1 回答 1

0

经过大量搜索以解决此问题,解决方案是通过执行以下命令在 Ubuntu 终端中安装 libdl.so:sudo ln -s /lib/x86_64-linux-gnu/libdl.so.2 /lib/x86_64-linux -gnu/libdl.so

现在我在导入 aesim.simba 时完全没有问题

这个答案来自:https ://github.com/sn4k3/UVtools/discussions/342

于 2022-02-06T15:24:10.740 回答