Messaoud Makhlouf
Messaoud Makhlouf

Reputation: 51

How to fix ImportError: System.DllNotFoundException: libdl.so

When I tried to import aesim.simba (power electronics package) in Jupyter notebook (I have Ubuntu budgie 21.10 as operating system), I got the following error

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 

I'm new in Linux world. Could any one tell me how to fix this issue and how to import aesim.simba correctly?

Upvotes: 0

Views: 1561

Answers (1)

Messaoud Makhlouf
Messaoud Makhlouf

Reputation: 51

After a lot of search to solve this issue, the solution is to install libdl.so in Ubuntu terminal by executing this command : sudo ln -s /lib/x86_64-linux-gnu/libdl.so.2 /lib/x86_64-linux-gnu/libdl.so

now I have no problem at all when importing aesim.simba

This answer is from: https://github.com/sn4k3/UVtools/discussions/342

Upvotes: 4

Related Questions