microdot
microdot copied to clipboard
File "microdot.py", line 25 SyntaxError: invalid syntax
>>> import microdot
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "microdot.py", line 25
SyntaxError: invalid syntax
upip install to /Lib/src ,so I directly save https://github.com/miguelgrinberg/microdot/blob/main/src/microdot.py to esp32c3 board
What do you have in line 25 of microdot.py? Do not look in github please, look in the copy of the file that was installed on your device.
@miguelgrinberg
import upip
upip.install('microdot')
it is the correct way to install microdot in esp32 board?
@QGB This is what I have in the documentation wrt installation:
For MicroPython, you can install it with upip if that option is available, but the recommended approach is to manually copy microdot.py and any desired optional extension source files from the GitHub repository into your device, possibly after compiling them to .mpy files. These source files can also be frozen and incorporated into a custom MicroPython firmware.
I don't use upip, and besides, it is getting replaced with a different tool called mip. I suggest you copy the files that you need manually, if possible after compiling them with mpy-cross so that they are smaller.