Ksnn ImportError: bad magic number in 'ksnn': b'U\r\r\n'

followed the instruction KSNN Usage [Khadas Docs]
installed ksnn-1.3-py3-none-any.whl

but ImportError occur:

python3 inceptionv3.py --model ./models/VIM3/inceptionv3.nb --library ./libs/libnn_inceptionv3.so --picture ./data/goldfish_299x299.jpg --level 0
Traceback (most recent call last):
  File "/home/khadas/work/ksnn/examples/tensorflow/inceptionv3.py", line 5, in <module>
    from ksnn.api import KSNN
ImportError: bad magic number in 'ksnn': b'U\r\r\n'

@albertchow Is there any modification to the team source code?

I’m also having this issue. I didn’t modify any of the source code. The code is running on the official Ubuntu 22.04 mainline OS.

I believe some recompilation is required from your end because the whl only contains pyc files that normal bad magic number fix requires to remove.

Hi there,
I am having exactly the same issue - I always get this error when trying to run a ksnn example :
"ImportError: bad magic number in ‘ksnn’ : b’U\r\r\n’ "

Do we have any fix for this yet @Frank ?

Same issue. I am trying to run ksnn on vim 4.