ModuleNotFoundError: No module named 'lvgl'


Can someone tell me what I did wrong here

You can’t run Micropython scripts with python.exe.
To run Micropython scripts you need to build Micropython.
To run LVGL with Micropython you need to build and use lv_micropython instead of python.exe.

It’s my first time using LVGL or any PC simulated environment. Can you guide me a little more on what should I do? On the website it said I need MinGW and Eclipse, I followed all the steps and when I build the project I got this result.

I’ve designed a UI, but how do I run it on my PC. I need to make it functional

Please follow the docs on lv_micropython: https://github.com/lvgl/lv_micropython#build-instructions
Windows is not well supported, please build and run on Linux (or Linux VM).

Can I do anything for WIndows?

To make it short, it means that you lacked some “dependencies” for the libraries you wanted to use. This is a common problem when installing python packages, mainly in windows. Before trying to use any kind of library, first it is suggested to look up whether it needs another library in python “family”.

The solution is to provide the python interpreter with the path-to-your-module/library. The simplest solution is to append that python path to your sys.path list. In your notebook, first try:

import sys
sys.path.append('my/path/to/module/folder')

This isn’t a permanent change in sys.path, because when you log out, your environment is reset, so any variables you may have set are lost.

The better (and more permanent) way to solve this is to set your PYTHONPATH, which provides the interpreter with additional directories look in for python packages/modules.

from BASH type: export PYTHONPATH=/path/to/new/folder:/another/path/...../

#each path must be separated by a colon