pikasTech / PikaPython

An ultra-lightweight Python interpreter that runs with only 4KB of RAM, zero dependencies. It is ready to use out of the box without any configuration required and easy to extend with C. Similar project: MicroPython, JerryScript.
http://pikapython.com/
MIT License
1.45k stars 132 forks source link

ModuleNotFountError: No module named 'machine' #314

Closed IcyFeather233 closed 1 year ago

IcyFeather233 commented 1 year ago

Intro

I'm using RT-Thread env to run qemu-vexpress-a9, and I add pikascript package. I can run the 'hello PikaScript', but when I import machine like the examples, it errors and says: ModuleNotFountError: No module named 'machine'. I want to use machine lib to play with UART, can somebody help me?

Environment

OS: Windows 10 RT-Thread: v5.0.0(latest) RT-Thread env: v1.3.5 pikascript: lastest bsp: qemu-vexpress-a9

screenshots

image

pikasTech commented 1 year ago

First, you can find which modules can be imported by help("modules")

>>> help("modules")

And if you want install the module you can see this document.