Closed china-zhangdj closed 3 years ago
Hi @china-zhangdj,
evdev
is a frozen module.
There is a Micropython bug related to sys.path
affecting importing of frozen modules: https://github.com/micropython/micropython/issues/6419
To work around this, you can try running Micropython without command line arguments, and then something like this:
import sys
sys.path.append('lib/lv_bindings/examples')
import fb_test
Thank you very much!
execute:
import sys
sys.path.append("")
can fix it.
example: test.mpy
#!/usr/bin/micropython
import sys
sys.path.append("")
import evdev
import lvgl as lv
import fb
Yes adding sys.path.append("") is a simpler workaround, thank you for this suggestion.
I'm closing this issue.
I compiled and installed lv_micropython on raspberrypi. When I executed "micropython lv_binding_micropython/examples/fb_test.py". I encountered an error: "ImportError: no module named'evdev'", but when I executed import evdev in the REPL, it did not Report an error, what caused this.