ModuleNotFoundError: No module named 'pyb'
ModuleNotFoundError: No module named 'pyb'
Hello, I'm just new to micropython and I just managed to get python installed on microsoft code.
Now I've connected my pyboard 1.1 and try to run a default program.
The first error I hit is: ModuleNotFoundError: No module named 'pyb'
I hope someone can help solving this? Thanks.
Now I've connected my pyboard 1.1 and try to run a default program.
The first error I hit is: ModuleNotFoundError: No module named 'pyb'
I hope someone can help solving this? Thanks.
Re: ModuleNotFoundError: No module named 'pyb'
Which board are you using? The pyb module exists on the stm32 port, and doesn't exist on the ESP32 and ESP8266 ports.
The general preference is to use the machine module where possible.
The general preference is to use the machine module where possible.
Re: ModuleNotFoundError: No module named 'pyb'
Hi, I'm using the pyboard 1.1. So this is with the STM32405RG. I'm trying to upload an code to the board from VSCODE. The board is connected, but when trying to RUN it says:
PS C:\Users\Marc Frim> & "C:/Users/Marc Frim/AppData/Local/Programs/Python/Python38-32/python.exe" "c:/Users/Marc Frim/.vscode/extensions/rt-thread.rt-thread-micropython-1.0.7/microExamples/examples/03.board/5.pyboard/blink.py"
Traceback (most recent call last):
File "c:/Users/Marc Frim/.vscode/extensions/rt-thread.rt-thread-micropython-1.0.7/microExamples/examples/03.board/5.pyboard/blink.py", line 2, in <module>
import pyb
ModuleNotFoundError: No module named 'pyb'
PS C:\Users\Marc Frim>
PS C:\Users\Marc Frim> & "C:/Users/Marc Frim/AppData/Local/Programs/Python/Python38-32/python.exe" "c:/Users/Marc Frim/.vscode/extensions/rt-thread.rt-thread-micropython-1.0.7/microExamples/examples/03.board/5.pyboard/blink.py"
Traceback (most recent call last):
File "c:/Users/Marc Frim/.vscode/extensions/rt-thread.rt-thread-micropython-1.0.7/microExamples/examples/03.board/5.pyboard/blink.py", line 2, in <module>
import pyb
ModuleNotFoundError: No module named 'pyb'
PS C:\Users\Marc Frim>
Re: ModuleNotFoundError: No module named 'pyb'
It looks like it's trying to run in regular Python (i.e. CPython) rather than on the pyboard.
Re: ModuleNotFoundError: No module named 'pyb'
Indeed I did install python, RT-Thread MicroPython and Pymakr into VS code. Still I'm getting this error: ModuleNotFoundError: No module named 'pyb' when pressing RUN.
-
- Posts: 7
- Joined: Mon Jul 13, 2020 8:55 am
Re: ModuleNotFoundError: No module named 'pyb'
i'm having a similar problem with pycharm, the error is the following :
DEPRECATION: The -b/--build/--build-dir/--build-directory option is deprecated. pip 20.3 will remove support for this functionality. A possible replacement is use the TMPDIR/TEMP/TMP environment variable, possibly combined with --no-clean. You can find discussion regarding this at https://github.com/pypa/pip/issues/8333.
ERROR: Could not find a version that satisfies the requirement pyb (from versions: none)
ERROR: No matching distribution found for pyb
I am able to install other libraries of micropython
DEPRECATION: The -b/--build/--build-dir/--build-directory option is deprecated. pip 20.3 will remove support for this functionality. A possible replacement is use the TMPDIR/TEMP/TMP environment variable, possibly combined with --no-clean. You can find discussion regarding this at https://github.com/pypa/pip/issues/8333.
ERROR: Could not find a version that satisfies the requirement pyb (from versions: none)
ERROR: No matching distribution found for pyb
I am able to install other libraries of micropython
Re: ModuleNotFoundError: No module named 'pyb'
You don't need to pip install the pyb module, it's included in the firmware.
-
- Posts: 7
- Joined: Mon Jul 13, 2020 8:55 am
Re: ModuleNotFoundError: No module named 'pyb'
how do i use it then? when i write it i get Unresolved reference 'pyb'
Re: ModuleNotFoundError: No module named 'pyb'
The pyb module only exists on Pyboard hardware. Which board are you using?
-
- Posts: 7
- Joined: Mon Jul 13, 2020 8:55 am
Re: ModuleNotFoundError: No module named 'pyb'
i am using a nucleo-f767zi, but shouldn't be able to mimport it anyway and not be able af use it??