Error in inference (libVSC)

I’m facing this error while running inference. I’ve tried reinstalling the OS but to no effect

Traceback (most recent call last):
  File "", line 65, in <module>
    resnet18.nn_init(library=library, model=model, level=level)
  File "/home/khadas/.local/lib/python3.8/site-packages/ksnn/", line 86, in nn_init
    val = self.ksnn_api.neural_network_create(library, model, level)
  File "/home/khadas/.local/lib/python3.8/site-packages/ksnn/kplatform/vim3/", line 9, in neural_network_create
    self.detect_so = CDLL(library)
  File "/usr/lib/python3.8/ctypes/", line 373, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: cannot open shared object file: No such file or directory

I tried using this fix inside the ksnn directory and now I’m facing this error

 |---+ KSNN Version: v1.1 +---| 
Start init neural network ...
Get input data ...
Start inference ...
Traceback (most recent call last):
  File "", line 82, in <module>
    outputs = resnet18.nn_inference(cv_img, input_tensor=1, output_tensor=1, platform = 'PYTORCH', reorder='2 1 0', output_format=output_format.OUT_FORMAT_FLOAT32)
  File "/home/khadas/.local/lib/python3.8/site-packages/ksnn/", line 219, in nn_inference
    res = self.nn_set_inputs(cv_img, platform=platform, reorder=reorder, tensor=input_tensor)
  File "/home/khadas/.local/lib/python3.8/site-packages/ksnn/", line 139, in nn_set_inputs
    val = self.ksnn_api.neural_network_set_input(pixel_data, reorder_format, platform_format, i)
  File "/home/khadas/.local/lib/python3.8/site-packages/ksnn/kplatform/vim3/", line 171, in neural_network_set_input
    pre_process = self.detect_so.NPU_SetInput
  File "/usr/lib/python3.8/ctypes/", line 386, in __getattr__
    func = self.__getitem__(name)
  File "/usr/lib/python3.8/ctypes/", line 391, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: ./libs/ undefined symbol: NPU_SetInput

@johndoe The least version is 1.2. So I ask you ,did you updat all repo to least ?

Repo means ksnn or aml_npu_sdk?

Update: Updated ksnn to 1.2 and everything ran fine. Thanks @Frank for the help