[EV3] help with importing the ulab module

Discussion and questions about boards that can run MicroPython but don't have a dedicated forum.
Target audience: Everyone interested in running MicroPython on other hardware.
Post Reply
ev3ulabenjoyer
Posts: 2
Joined: Mon Mar 01, 2021 10:51 pm

[EV3] help with importing the ulab module

Post by ev3ulabenjoyer » Mon Mar 01, 2021 10:59 pm

Hello

I am having trouble with importing the ulab module on the EV3 after having compiled it as described at https://github.com/v923z/micropython-ulab#unix-port

I am able to run an interactive session at ulab/micropython/ports/unix where I can import ulab just fine, however outside of that interactive session I am unable to import ulab. I am using SSH (via Visual Studio Code) to access the EV3 and go through its file system. The tests that were included in the ulab repo (see https://github.com/v923z/micropython-ul ... ster/tests) also all fail because they're unable to import ulab. Any help is appreciated :)

User avatar
jimmo
Posts: 2754
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: [EV3] help with importing the ulab module

Post by jimmo » Wed Mar 03, 2021 5:31 am

ev3ulabenjoyer wrote:
Mon Mar 01, 2021 10:59 pm
I am having trouble with importing the ulab module on the EV3 after having compiled it as described at https://github.com/v923z/micropython-ulab#unix-port
I'm not entirely sure how the EV3 works -- does it run Linux? Are you compiling MicroPython on the EV3 itself?

What's the difference between the interactive session that works and accessing it via SSH? How do you get an interactive session if not by SSH? (Sorry I don't know much about the EV3)

ev3ulabenjoyer
Posts: 2
Joined: Mon Mar 01, 2021 10:51 pm

Re: [EV3] help with importing the ulab module

Post by ev3ulabenjoyer » Wed Mar 03, 2021 8:14 pm

jimmo wrote:
Wed Mar 03, 2021 5:31 am
I'm not entirely sure how the EV3 works -- does it run Linux? Are you compiling MicroPython on the EV3 itself?
A microSD card which includes an installation of ev3dev (a Debian-based Linux OS see https://www.ev3dev.org/) is inserted into the EV3. MicroPython runs on top of ev3dev.
jimmo wrote:
Wed Mar 03, 2021 5:31 am
What's the difference between the interactive session that works and accessing it via SSH? How do you get an interactive session if not by SSH?
A "normal" interactive session (as in physically playing around with the EV3) allows you to run programs (that you've transferred to the EV3 from a PC) and change some basic settings through the ev3dev GUI on the EV3 device. By accessing the EV3 through SSH you're given a Bash shell to work with, which allows you to do much more (like cloning the ulab git repo and compiling it).
jimmo wrote:
Wed Mar 03, 2021 5:31 am
(Sorry I don't know much about the EV3)
Nothing wrong with that, I'm learning myself :D

Post Reply