Notifications
Clear all

MicroPythonOS Installation

8 Posts
5 Users
1 Reactions
204 Views
(@ruffrecords)
Member
Joined: 4 weeks ago
Posts: 3
Topic starter  

I successfully worked my way through the cheat sheet only to fall at the last hurdle. When I tried to run the Linux desktop version I got the following error:

itb@workshopnewubuntu:~/MicroPythonOS$ ./scripts/run_desktop.sh
Usage:
./scripts/run_desktop.sh # with no arguments just starts it up normally
./scripts/run_desktop.sh scriptfile.py # doesn't initialize anything, just runs scriptfile.py directly
./scripts/run_desktop.sh appname # starts the app by appname, for example: com.example.helloworld
Running on Linux
~/MicroPythonOS/internal_filesystem ~/MicroPythonOS
sys.version=3.4.0; LVGL (9.3.0) MicroPython (1.25.0) Binding compiled on 2026-02-11
sys.implementation=(name='micropython', version=(1, 25, 0, ''), _machine='linux [GCC 13.3.0] version', _mpy=2822, _build='standard')
Free space on root filesystem:
total_space=490574913536 / used_space=267983745024 / free_space=222591168512 bytes
RAM: 8289088 free, 2240 allocated, 8291328 total
Passing execution over to mpos.main
Traceback (most recent call last):
File "main.py", line 31, in <module>
File "lib/mpos/__init__.py", line 22, in <module>
File "lib/mpos/webserver/__init__.py", line 3, in <module>
File "lib/mpos/webserver/webrepl_http.py", line 5, in <module>
ImportError: no module named '_webrepl'
~/MicroPythonOS

Basically I seem to be missing the _webrel module but I do not see where in the cheat sheet this is installed.

 

Any help appreciated.

 

Cheers

 

Ian



   
Quote
(@dronebot-workshop)
Workshop Guru Admin
Joined: 7 years ago
Posts: 1182
 

This is not an uncommon problem, and I should update the article to reflect this - many Ubuntu installations don't have the _webrepl module.  One of my workstations had the same problem.

Modify the following file, and it should work - ~/MicroPythonOS/lib/mpos/webserver/webrepl_http.py

Replace the import _webrepl line with this:

try:
    import _webrepl
except ImportError:
    _webrepl = None

😎

Bill


"Never trust a computer you can’t throw out a window." — Steve Wozniak


   
ReplyQuote
(@juno_65)
Member
Joined: 5 years ago
Posts: 1
 

I hope this is the right place for this.  I watched the Video on micropythonOS and went through the installation on Linux.  My question is "How different is it to install on MacOS than Linux?"



   
ReplyQuote
(@ruffrecords)
Member
Joined: 4 weeks ago
Posts: 3
Topic starter  

Hi BNill,

 

Thanks for the reply. I don't seem to have the file:

/MicroPythonOS/lib/mpos/webserver/webrepl_http.py

 

in fact I do not even have the /lib directory

 

Cheers

 

Ian



   
ReplyQuote
Yassin
(@yassin)
Member
Joined: 3 months ago
Posts: 29
 
The core issue is that your MicroPythonOS install is missing the entire lib directory and its associated files—the essential core files/submodules are absent from your setup.
 
First, back up your current directory with this command:mv ~/MicroPythonOS ~/MicroPythonOS_bak
 
Then clone the full, complete source code (this will automatically pull all missing directories and files):

 

git clone --recurse-submodules https://github.com/micropythonos/micropythonos.git ~/MicroPythonOS

 
Once this is done, the lib/mpos/webserver/webrepl_http.py file will be there. Next, replace the single import _webrepl line in that file with the try/except error-handling code Bill suggested, then re-run the script:

 

./scripts/run_desktop.sh

 
This should get it working for you!
 
Yassin

This post was modified 3 weeks ago by Yassin

Yassin | Building Compact, High-Current Connections for Drones & Robots


   
ReplyQuote
Westislander
(@westislander)
Member
Joined: 3 weeks ago
Posts: 9
 

It looks really interesting. I didn't see a version for the (in)famous "Cheap Yellow Display" computer. Is it in the pipeline?

 



   
ReplyQuote
(@dronebot-workshop)
Workshop Guru Admin
Joined: 7 years ago
Posts: 1182
 

@westislander Yes, it is one of the boards they are discussing in the Telegram chat.  Of course, the original CYD is a resistive display, so performance may not be as good as that of capacitive displays, but it's certainly a popular board.

BTW, they released MicroPythonOS version 0.9 yesterday.

😎

Bill

 

 


"Never trust a computer you can’t throw out a window." — Steve Wozniak


   
ReplyQuote
Westislander
(@westislander)
Member
Joined: 3 weeks ago
Posts: 9
 

@dronebot-workshop I know the touch screen is not the best of breed, however it is a handy and versatile board that's low cost means many people can access it for their ideas.



   
ReplyQuote