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

BL616的network模块适配问题 #327

Open Y1ZzLu opened 10 months ago

Y1ZzLu commented 10 months ago

使用M0S Docker bl616,在requestment中添加了network并拉取包之后 在pikastudio中会报错Error: invalid version number. Expected 4, got 6 当在studio中import network报错,显示不存在network模块ModuleNotFoundError: No module named 'network IMP network (#1) 将该固件烧录至BL618M0P Docker板子后,无虚拟串口显示

pikasTech commented 10 months ago
  1. 之前的requestment里面的内核写的是latest,所以拉取包之后被更新到了最新内核,所以字节码的version number和内核的对不上,这个问题重新预编译脚本然后下载进去就可以了,建议内核和标准库版本改到1.12.3试一下
  2. 先确认是否有在main.py 里面import network,main.py中import了,才会被预编译进固件,你可能没有运行预编译,另外预编译后也要重新刷脚本,确保脚本包里有 network.py 模块的字节码。