[Get started] Error on import when using esptool

Hey microEJ !

I’m trying your MICROEJ SDK with this ‘Get Started’ , but i’m reaching to a small problem, I can’t flash the firmware with the esptool mentioned in the section 5.

When launching the command, an python ImportError is raised :sweat_smile:

Traceback (most recent call last):
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1264.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1264.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Users\acare\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\esptool.py", line 35, in <module>
    raise ImportError("""
esptool.py depends on pyserial, but there is a conflict with a currently installed package named 'serial'.

You may be able to work around this by 'pip uninstall serial; pip install pyserial' but this may break other installed Python software that depends on 'serial'.

There is no good fix for this right now, apart from configuring virtualenvs. See https://github.com/espressif/esptool/issues/269#issuecomment-385298196 for discussion of the underlying issue(s).

As I was messing around with the imports, I found that if only the module pyserial was installed without any installation of serial, the command worked.

These two config are working:

  1. esptool 3.1.1 (as mentioned in the get started) and pyserial 3.5 (installed by pip)
  2. esptool 3.3 (installed by pip) and pyserial 3.5 (installed by pip)

Therefore, do we really need the serial module ?

OK I tested the installation and you are right the python dependency installation conflicts. We fixed the page by removing the serial dependency.

Thank you for your input.