Announcing the MicroPython Plugin for PyCharm

Today we’ve released the MicroPython plugin 1.0 for PyCharm. This plugin lets you edit your MicroPython code and interact with your MicroPython-powered microcontrollers using PyCharm. It supports ESP8266, Pyboard, and BBC Micro:bit devices. The plugin is being developed as a team project by the PyCharm Community lead Andrey Vlasovskikh. The source code for the project can be found on GitHub.

MicroPython is a relatively new member of the Python interpreters family. It’s basically a Python 3.5 implementation designed for microcontrollers — small computing devices that are used everywhere from smart watches to cars. People usually program microcontrollers in C or an assembly language due to low performance and memory limits. Thanks to clever optimization techniques implemented in MicroPython you can now use (almost) standard Python for microcontrollers. For example, you can create your own Internet of Things device and program it in MicroPython.

The MicroPython plugin is compatible with both PyCharm Community and Professional editions. We’re going to make it available for IntelliJ IDEA soon as well. Let me walk you through the setup process and the features of the plugin using PyCharm:

We’ll be using an ESP8266-based device called WEMOS D1 mini. Basically, it’s a Wi-Fi chip with a couple of digital and analog I/O pins to connect external sensors and actuators. But for our simple demo, we won’t need anything besides the LED light that is already located on the device and is connected to the digital output pin 2.

This is our demo program which toggles the LED every second:

Let’s get started setting up our device!

First of all, make sure your OS can see your device via USB. This step is device-dependent. For WEMOS D1 mini on Windows and macOS you’ll need a serial port driver provided by the device vendor.

Next, we’ll setup PyCharm to work with your device. First, you need to install the MicroPython plugin in PyCharm “File | Settings | Plugins”. Then you need to create a new Python project in “File | New Project…”. In PyCharm 2017.3 the new project dialog with the correct settings will look like this:


Make sure you’ve configured a Python 3.5 or a newer interpreter for it (preferably a virtual environment), since the MicroPython plugin will later ask you to install a few Python packages to communicate with your device.

After that add a new file to your new project with the contents of our program above. Finally, enable MicroPython support for your project in “File | Settings | Languages & Frameworks | MicroPython” and specify your device there:

MicroPython Configurable

Now let’s see what the plugin has to offer.

Code Completion and Documentation

The MicroPython plugin provides code completion and documentation for MicroPython-specific modules:

MicroPython Code Completion

Notice that code completion is context-aware. On this screenshot PyCharm shows you only the members of the utime module.

The quick documentation window contains the docs for the selected name. Use Ctrl+Q (F1 on macOS) to show this pop-up window. You can also dock it and enable “Auto-update from Source” to keep it permanently.

Syntax Checking and Type Checking

The plugin searches syntax errors and other problems in your code like potential AttributeError or ImportError using static code analysis. It comes with Python stub files for device-specific binary modules. These stubs contain Python type hints that make it possible to check types in your MicroPython code:

MicroPython Type Checking

On the screenshot above you can see several Python syntax errors when the user tries to write some C code in the middle of their Python file. There is also a type error in utime.sleep_ms(3.14), since this function only accepts integers.

Flash Files to Devices

The MicroPython plugin helps you to upload your files to your MicroPython device via USB. Use “MicroPython” run configurations to flash files or folders to your device in “Run | Edit Configurations…” menu. To quickly upload a single file you can select “Run ‘Flash <your-file-name>.py’” from the context menu of your Python file:

MicroPython Run Configuration

MicroPython REPL

Interactive experiments play an important role in Python development, but they are even more important with microcontrollers which usually don’t have any screens to show possible errors. The MicroPython plugin allows you to quickly run an interactive Python REPL console. Use “Tools | MicroPython | MicroPython REPL” menu to run a MicroPython shell on your device.

MicroPython REPL

I hope you enjoy this plugin. I’ll be glad to hear your feedback and how you’re using it. Tell me about your experience with it in the comments below, or on twitter: @vlasovskikh or @pycharm. Star or fork the intellij-micropython repository on GitHub, send your issues and pull requests!

This entry was posted in Cool Feature and tagged . Bookmark the permalink.

107 Responses to Announcing the MicroPython Plugin for PyCharm

  1. Swington says:

    Great work! I am currently using MicroPython for my masters project and the ability to use PyCharm power while writing code could be a gamechanger.
    I also want to ask if you are planning on supporting unix porting of MicroPython? Thanks to its enormous speed it’s gaining more and more popularity and it would be great if you could use PyCharm to develop proper applications with MicroPython.

    • Andrey Vlasovskikh says:

      Is your use case about using it instead of CPython for your regular Python code or is it about testing your MicroPython programs before flashing them to devices? Do you need any MicroPython-specific features for it?

      • Swington says:

        Well, testing code for embedded systems is one useful application for unix porting.
        Another is for writing regular ‘desktop’ programs in MicroPython, which has a huge speed advantage over regular Python. I am, for instance, using it for writing system management scripts for my system, as MicroPython is faster than bash – great for working in background.
        I am also currently investigating usage of MicroPython for microservices, where it can sometimes be a valuable resource saver.
        What I am saying, I guess, is that MicroPython seems to have a bright future ahead of it, not only on embedded systems. Preparing PyCharm to use it could be valuable.

      • Swington says:

        As to specific features – from what I saw, you cannot choose MicroPython to be a project interpreter. It would be great if you could.

  2. Helgi Borg says:

    Thanks for an interesting post. Do you plan to support Arduino devices?

    • Andrey Vlasovskikh says:

      My current understanding is that Arduino is a separate ecosystem not related to MicroPython. Could you describe your workflow with Python on Arduino and share some links to projects / other resources on this topic?

      • Helgi Borg says:

        You are of course right! I first learned about MicroPython while reading this blog post. I then scan some Arduino pages and though I saw a mention of MicroPython support in Arduino boards, but now that I checked it better I see that I’m wrong. The Arduino eco system doesn’t seem to support MicroPython yet – hopefully some day.

        • Andrey Vlasovskikh says:

          Got it. Thanks for your comment!

        • Janez Demšar says:

          Arduino has Harvard architecture with 32 KB of program space and only 2 KB of SRAM that you can use for heap and stack. Python won’t fit; 2 KB is probably too small to do anything useful. In comparison, ESP8266 has 64 KB for instructions and 96 KB for data.

          For using Arduino from Python, check Firmata, but that’s different: the interpreter runs on a PC and communicates with Arduino using serial port.

  3. Sohail Qureshi says:


    REPL is not working on windows. The Windows command prompt is shown instead of REPL.

    • Andrey Vlasovskikh says:

      Thanks for your feedback! Yes, it’s a known problem, I’m looking for contributors to address it. See issue #12.

    • Andrey Vlasovskikh says:

      I’ve fixed REPL on Windows in 1.0.4.

      • Kris says:

        Just installed the plugin update I think I still have issues. If I select the Python Console tab I see the REPL from what looks like my conda environment (similar to venv’s) not the REPL from the board. The Terminal tab has the usual CMD,EXE/PowerShell prompt (shudder – now that’s where I would really like to see an ssh session to WSL!!). The Run tab has the usual upload to board progress stuff in it.

        Have I done something wrong or is it possibly the fact that I use conda rather than venvs that may be the issue?

        Sorry – just finished this and realised I should have put it in the tracker. Off to do that now.

  4. Kris says:

    I can report success on an Adafruit ESP32 Feather board on latest PyCharm Pro/Win10. successfully flashed, reset and running. No REPL as I am on Win10 (known issue).

    Great job! I’m going to try to set it up so it uses my conda environment under WSL. That SHOULD be more Unix-like and may allow the REPL to function. And it’s where I want to work anyway, man I hate CMD.EXE/PowerShell. One does too little, the other makes emacs look like a flyweight.

    I’ll update on the result of the WSL test (and possibly other micropython boards if it is of interest).

    • Kris says:

      Well, that was quick. Looks like PyCharm wants nothing to do with my conda environments under WSL. The fact that none of them have any files ending in .EXE in them may have a lot to do with it :-)

      Not sure if I want to go to the pain of getting all the GUI prerequisites installed under WSL so I can run PyCharm under WSL instead. I can still use MobiXterm to get to the board REPL so I still get all the other goodies from this plugin under WIN10 including flashing and then running the new code.

      It may be time to take a look at the kotlin and see if I can figure out what may be going on. The fact that I know absolutely nothing about kotlin discourages me a little bit so don’t hold your breath…. I am likely going to play with my boards a bit first.

      • Andrey Vlasovskikh says:

        I believe issue #12 about REPL on Windows won’t be hard to fix.

        Currently you can configure a WSL Python interpreter only as a remote interpreter in PyCharm Professional. See Configuring Remote Interpreters via WSL. Feel free to vote for PY-27879 for native WSL support.

        • Kris says:

          I added my vote (it seemed to be the first unless I did something wrong.

          I’m a little confused about the remote interpreters/WSL link you sent me to. That seems to be the way to get to a python REPL from provided by a python installed within WSL, not the REPL from the connected micropython board.

          Is that how Win10 PyCharm would get to a REPL on the micropython board? Via a python interpreter installed under WSL? Presumably then the commmunications port used would have to provided in the form used by WSL (/dev/ttyS03 or something similar) within the MicroPython Languages/Framework setup in Win10 PyCharm.?

          Sorry for all the questions but I am having a little bit of a problem visualising this….

          • Andrey Vlasovskikh says:

            I’ve fixed the REPL on Windows issue in 1.0.4, so the WSL option isn’t worth investigating further.

    • Andreas says:

      How did you get your esp32 board to work? Serial com with REPL works, but uploading fails with ampy.pyboard.PyboardError: failed to access COM7.

  5. Kris says:

    Can I recommend you change this statement:

    “Make sure you’ve configured a Python 3.5 or a newer interpreter for it”

    To “Python 3.5 only (or latest Python 3.5 available)”.

    I suggest not installing Python 3.6 or later as features that are available in 3.6 or later will not be syntax highlighted as incorrect. An example of this is f-strings. If you installed 3.6 then f-strings will be OK according to PyCharm but if you installed 3.5 then you will get notified of the problem. If micropython moves forward to being closer to base 3.6 then the Python version can be updated.

    This is why we use virtual environments, right?

  6. Kris says:

    Gotta say my workflow has been vastly sped up by using this plugin over how I was doing things before. Being able to upload 5 project files to my board with the push of a button is just awesome!! Don’t care about the missing Win10 REPL – this has already made me twice as fast at creating my micropython code. Not missing having to run ampy myself at all!!

    One question – in an image above there is a dropdown with “Flash micropython-project”. How do you get that? The way I got multiple files to upload was to make multiple configurations, one for each python file. Then my project uploads but as a prerequisite runs the individual configurations for the other files in the project. Is there an easier way?

    Certainly providing just the root directory was not a good plan as it initiated an attempt to also upload the ‘.idea’ subdirectory that PyCharm creates (not a good IDEA, sorry just couldn’t let that one pass).

    • Andrey Vlasovskikh says:

      Thanks for your feedback!

      You can specify either individual files or directories in your MicroPython run configurations. Create a new one via “Run | Edit Configurations” menu and specify the path you want to become your root folder after uploading to your device. You can mark unnecessary sub-directories as excluded by right-clicking on them in the project view and selecting “Mark Directory as | Excluded”. The .idea folder is hidden and excluded by default, so it should interfere with your upload.

      Feel free to report any problems with this feature to the issue tracker.

      • Kris says:

        You are way ahead of me apparently. I had not noticed that I could exclude files/directories.

        Would you like feature requests on the issue tracker as well? I am sure I can come across something I would like to see improved although it is proving difficult so far :-) A solution to issue #12 would certainly be my highest priority right now.

        • Andrey Vlasovskikh says:

          Sure, feel free to file new feature requests.

          • Kris says:

            Solution didn’t work – under Win10 the ‘.idea’ directory isn’t displayed in the project view to select in order to exclude. I can’t seem to find a setting to change that…

        • Andrey Vlasovskikh says:

          Could you report an issue about mistakenly uploading .idea alongside the rest of the project to the issue tracker and share your project with all the project files (as a GitHub project or as a link to an archive)?

        • Nils Jannasch says:

          You can include e.g. the folder manually in your *.iml project file like:

          This prevents to upload those folders.

  7. Marijn Vriens says:

    Totally awesome! I’m going to love using this for my next embedded projects!

    Next stop: Remote device debugging in CLion 😉

  8. aaron says:

    Trying to install the plugin based what is stated in the article, however, I keep getting this error:

    Plugin MicroPython was not installed: Cannot download ‘’: Read timed out

    What might be the issue?


  9. aaron says:

    Yes, it loaded.

    Another question how do you find the device path for the usb? I looked in device manager and the device instance path for Com port 6 and it gives me USB\VID_10C4&PID_EA60\013742A2. This is not anything like what the tutorial show?

    • Andrey Vlasovskikh says:

      The plugin has a hard-coded list of (VID, PID) for several devices in their device type provider class. For ESP8266 it’s this line. These IDs are then passed to that returns a device name on Windows or a device path on macOS/Linux.

      Feel free to test the plugin build from sources for your device and send a pull request.

  10. Wasanka says:


    Are there any plans to add websocket connection to micropython devices so that programming and flashing can be done wireless?

  11. Jaime Caballero says:

    Hey, I own a pyboard and I been using it just editing the file. It is really cool to have the REPL o pycharm but theres a problem for me… I have Windows 10 and there no driver support for the pyboard. Do you know what can I do ?

  12. Federico says:

    Hello Andrey, first of all, I wanted to congratulate you for this great work, it is a great effort.
    I was following the steps, but I have a problem when downloading the firmware to ESP8266. I get the following sentence:

    Connecting to / dev / ttyUSB0
    Uploading files: 0% (0/1)

    and it does not advance anymore, it stays there.
    I would be grateful for the help you can give me.
    Thank you very much!

    • Andrey Vlasovskikh says:

      Thanks Federico!

      The plugin doesn’t update the MicroPython firmware. You need to flash your interpreter manually via esptool, see wiki page on ESP8266 for an example. The parameters will be specific to your board.

      The plugin is capable of flashing Python files after your interpreter on the device is set up.

      Please feel free to file bug reports to the issue tracker.

      • Federico says:

        Resolved, thank you very much for the help, I overlooked this item.
        It goes very well, I will continue working with him and I will recommend him to my colleagues.

        Thanks and congratulations for the work.

  13. Jonas says:

    Hey, great work! The MicroPython entry under Tools does not show up for me. Could this be a configuration error on my side? Flashing files works, so the Plugin seems to work generally.

  14. PointOnePA says:

    Just some feedback from using MicroPython Plugin for PyCharm Community 2017.3 under Windows 10 and the pyboard.

    1) The plugin won’t work with the PyCharmEDU version because that version doesn’t install the embedded terminal. I could not find the correct terminal plugin to add after the fact, which is why I installed the Community edition

    2) REPL works under Windows, but if you start it, it stops any running program on the pyboard and ties up the COM port. Thus you have to close the REPL terminal in order to use RUN again.

    3) RUN connects to the COM port long enough to upload the file, then released the COM port. If the pyboard program writes to the pyboard console using “print”, then you can use Putty or some other serial program to connect to the COM port to monitor the activity.

    4) I could get around the above console issue just by opening another COM port and using that for print/diagnostics, instead of the default, (thus leaving the default available to PyCharm for the RUN command). I use a 3.3V USB to serial device (FTDI TTL-232R-3V3) and a 2nd USB port on the PC.

    5) I see the value of having this tool and of using PyCharm IDE and IntelliJ to do code development. Another way that I’ve been using for a while with the pyboard is to locate the project files located on the pyboard via the Windows USB flashdrive. PyCharm the edits those files upon the pyboard, (this may not be possible on other devices). I then use from the Putty COM interface to test the files that I’m working on in PyCharm IDE. So I still have that advantages of PyCharm and IntelliJ and leaves Putty open for diagnostics and doesn’t require a second serial port for diagnostics.


  15. András Kovács says:

    Do you plan to add support for pycom devices?!


    • Andrey Vlasovskikh says:

      Hey András. At the moment I have no immediate plans to support Pycom devices, but I’m sure they won’t be hard to support. Feel free to file a feature request at the issue tracker about supporting Pycom devices. If you’re interested to contribute this support as a pull request on GitHub, I will share some details with you there.

  16. Dave says:

    Thanks for the excellent effort Andrey Vlasovskikh.

    My NodeMCU is not getting detected under the Device Path of Pycharm, Windows10. (able to access through putty). Is there any way to configure the COM port manually for Windows10 (COM5).

    Thanks in advance.

    • Andrey Vlasovskikh says:

      Dave, thanks for your comment. AFAIK NodeMCU are ESP8266-based, so the plugin should work with them: flashing files, the REPL console, code analysis should work fine. As for device detection, the plugin relies on USB vendor ID and product ID used in serial controllers of devices in the device detection code. But it’s perfectly fine to specify the name of the port manually. Just enter COM5 in the Device Path field in the settings.

      If you want the plugin to detect your device automatically, feel free to find the vendor ID and product ID for your board (you can discover them using the bits of in the plugin source code) and contribute these data as a pull request. You will need to modify this piece of the plugin code. It’s written in Kotlin, but I guess adding a line of code will be pretty straightforward.

      • Dave says:

        Many thanks Andrey.
        I’ve managed to get the ESP8266 detected with the below.

        1) Uninstalled Python3.6
        2) Installed Python3.5
        3) Copied .py files to PycharmProjects\upython.

        Thanks again.

  17. Thomas Braun says:

    I’m actually stuck at the very first step – where do I download the plugin so I can install it in PyCharm? It does not show up in the list of available plugins under Setting/Plugins…

  18. Eric Pascual says:


    Great :)

    Since I’m a PyCharm fan and just discovering the ESP32 world, this plugin couldn’t arrive at at better moment.

    A couple of questions :

    1/ I’m experimenting with an ESP32 based board, and ESP32 is not listed in the targets type (only ESP8266 is proposed for the ESP family). Is it supposed to arrive soon, or is the ESP8266 option suppose to fit ?

    2/ a message is displayed warning about the fact that ESP8266 support requires Python 3.5. I’m working in a pyenv virtualenv with 3.4 installed, since this is the version reported by the ESP32 REPL. Am I supposed to use a 3.5 based env despite the target version not being the same ?

    Thanks in advance for any info.

    Best regards

    • Andrey Vlasovskikh says:

      Eric, thanks for your comments. You can work with your ESP32 devices by selecting ESP8266 as your device type. Even though ESP32 is not officially supported by the plugin yet, it actually works. Feel free to follow and comment issue #44.

      • Eric Pascual says:

        Thanks Andrey for the quick feedback and kudos for the work done.

        The ESP32 seems to be an Arduino killer, and being able to use and IDE such as PyCharm to work with it definitely makes this option even more killer. OK, the Arduino could not sustain the comparison anyway 😉

        How is it possible to have ESP32 libs be recognized by code inspection and completion ?

        I hacked it for packages added with upip, by manually copying the files installed by upip on the board to the site-package dir of the virtual env on the PC, but I can’t do the same for other ones such as neopixel which come built-in the micro-python image.

        I’ve noticed that machine, network,.. are included in the pyi files collection which are bundled in the plugin. Do the “missing” ones belong to the ESP32 world (and not ESP8266), which would mean that there are supposed to be part of a future ESP32 extension of the plugin ?

        (BTW, what are exactly these *.pyi files)

        Thanks in advance for any information.

        Best regards.

        • Andrey Vlasovskikh says:

          ESP32-specific libs are not supported yet. The plugin provides type hints for built-in libraries such as machine or micropython, see the source code of the type hinted modules. An extra contributions are welcome. For example, here people are discussing type hints for pyb which is the main machine-specific modules on Pyboard devices. See PEP 484 for a general overview of type hints and *.pyi stub files in Python.

  19. Eric Pascual says:

    Oops, forgot this point in my previous message.

    I can’t see the MicroPython submenu in the the Tools menu. Anything not working as it should ?

    I have an ESP32 presently connected on USB while testing the plugin.


    • Eric Pascual says:

      OK, replied to myself.

      I’ve overlooked the fact that the required Python version relates to the tools. After installing a 3.5 based env, the MicroPython sub-menu is here.

      Sorry for spamming :/


  20. Jan-Pieter says:

    I use python 3.6 and added 3.5
    I use PyCharm 2018 EAP with the latest plugin for MicroPython on W10 ( I use other tools on linux )

    I am able to use it with :
    -ESP32 from SparkFun
    -ESP32 from Wemos with OLED ( SD1306 )

    Everything works. Although , I can not flash twice I have to disconnect & reconnec from time to time ( not always )

    I am very, very pleased with the plugin.

    I think you may add ESP32 :-) I continue to test.

    • Andrey Vlasovskikh says:

      Jan-Pieter, thanks for trying out the plugin! Feel free to follow issue #44 about introducing the official support for ESP32.

      There are some non-deterministic issues I’ve been also experiencing with connections to devices, especially in the REPL, but currently I have no answer for you.

  21. Geekly says:

    I can’t install the latest version of the plugin for PyCharm (2017.1). When I search the repositories, it wants to install version 0.1, which only supports the microbit devices. It fails when I try to manually install the latest version I dowloaded from here:

    • Andrey Vlasovskikh says:

      The recent versions of the MicroPython plugin require at least PyCharm 2017.2 or later due to the API changes in the IDE. See the requirements section on the GitHub page.

  22. Jack says:

    What caused the problem?I used pyboard。
    ampy.pyboard.PyboardError: (‘exception’, b”, b’Traceback (most recent call last):\r\n File “”, line 6, in \r\nOSError: File exists: \’..\’\r\n’)

  23. Jack says:

    What is this situation。
    Connecting to COM6
    Uploading files: 0% (0/1)
    E:\untitled3\ -> ..\untitled3\
    Traceback (most recent call last):
    File “C:\Users\Administrator\.PyCharm2018.1\config\plugins\intellij-micropython/scripts/”, line 138, in
    File “C:\Users\Administrator\.PyCharm2018.1\config\plugins\intellij-micropython/scripts/”, line 77, in main
    make_dirs(files, remote_dir, created_cache)
    File “C:\Users\Administrator\.PyCharm2018.1\config\plugins\intellij-micropython/scripts/”, line 94, in make_dirs
    make_dirs(files, parent, created_cache)
    File “C:\Users\Administrator\.PyCharm2018.1\config\plugins\intellij-micropython/scripts/”, line 96, in make_dirs
    File “D:\Python35\lib\site-packages\ampy\”, line 129, in mkdir
    raise ex
    File “D:\Python35\lib\site-packages\ampy\”, line 122, in mkdir
    out = self._pyboard.exec_(textwrap.dedent(command))
    File “D:\Python35\lib\site-packages\ampy\”, line 265, in exec_
    raise PyboardError(‘exception’, ret, ret_err)
    ampy.pyboard.PyboardError: (‘exception’, b”, b’Traceback (most recent call last):\r\n File “”, line 6, in \r\nOSError: File exists: \’..\’\r\n’)

  24. Qiwei says:

    First of all, thanks to Andrey Vlasovskikh, I in the windows10 Chinese system, using the pycharm2018 English version, starting Micropython REPL, in the input box, the backspace key and the direction key display chaotic code, almost not normal use, ask how to solve this problem, thank you.

  25. Allan Green says:

    Now when it supports ESP8266, does anyone know if this also support MicroPython on ESP32 modules ?
    I have tried to install PyCharm and the MicroPython plugin, but I can not select ESP32

  26. Luci says:

    I am started using MicroPython Plug-in for PyCharm Community 2018.1 under linux and with ESP8266.
    I followed instructions above and flashed the python script successful.
    Unfortunately LED is not blinking.
    Also PyCharm menu-tool doesn’t show “MicroPythen REPL”.
    I am wondering what I missed to do.
    Anybody the same problem out there?

    • Shyam says:

      yes, i have an amico nodeMCU with with i go up to Soft reboot on console, after which i did not see any led blinking, its quite strange to debug this situation, not able to trace out what might me the problem,

      • Shyam says:

        i reason why i was not able to run the code because the fine name should be instead of any custom name, i used mpfshell to see what are files present, identified that the file name in my project is not, just rename the file being uploaded to , solved my issue.
        Now this tool would be great for me :)

  27. Shyam says:

    i see an error
    ets_task(40100130, 3, 3fff83 ec, 4)
    OSError: [Errno 2] ENOENT
    after which the console is stuck, further COM wont allow me to type anything further

    • Andrey Vlasovskikh says:

      Please report any bugs to the issue tracker.

      Make sure that it’s a plugin issue, not a MicroPython issue or a problem with your setup. Try to connect to your board outside of PyCharm to see if it works for you without the plugin.

  28. Shyam says:

    This is a great plugin,
    I have used this with ESP8266 based NodeMCU board and created cool applications
    have a look :

  29. ID_H says:

    Andrey Vlasovskikh thank you very much for the excellent plugin. I have it running very well in OSX 10.13.6, Pycharm community 2018.2 and Node MCU with CH340 driver from

    I am a new convert from Arduino to MicroPython on ESP8266 as I love being able to work in python rather than C++ for my embedded projects and this plugin really provides an excellent workflow.

    I may be missing something obvious but, when you upload and run using the Flash command you see the dialog for the upload but is it possible to see the output from any print statements or error messages that generates while running?

    Thanks again for the great work

    • Andrey Vlasovskikh says:

      The plugin runs the upload script in the terminal and then closes the terminal session. In order to be able to see the data your MicroPython device writes into sys.stdout stream (i. e. into the serial port), you have to open another terminal session via “Tools | MicroPython | MicroPython REPL” and then quit the interactive Python REPL shell by hitting Ctrl+D or Ctrl+C.

  30. Daniel Magorian says:

    Hello! I can’t get Pycharm community 2018.2 to recognize Micropython’s serial port which win 10’s Device Manager shows is USB\VID_2341&PID_003B\64936333137351307141. Tools:Micropython:MicroPyton REPL returns the error below. Note the backslashes have been doubled. Thanks, Dan:
    Device path USB\VID_2341&PID_003B\64936333137351307141
    Found the device, but could not connect via port ‘USB\\VID_2341&PID_003B\\64936333137351307141’: could not open port ‘USB\\VID_2341&PID_003B\\64936333137351307141’: FileNotFoundError(2, ‘
    The system cannot find the path specified.’, None, 3)
    I’m not sure what to suggest. :-(
    Press ENTER to continue

    • Andrey Vlasovskikh says:

      Please report all bugs & questions to the issue tracker.

      My quick answer here: Windows usually names its serial ports COM1, COM2, COM3, and so on. Use function from pyserial to discover serial ports active on your system.

  31. Daniel Magorian says:

    Thanks! You’re right, all it needed was COM9, not that complicated COM9 string from Device Manager.

  32. Arana Fireheart says:

    I am using a WiPy on a MacBook Pro running Mohave and PyCharm 2018.3 EAP with Python 3.7 (yea, I know, beware f strings. ;-). I can upload my code to the device (tried both pyboard and ESP8266), but I can not get the REPL screen to open when I select Tools -> MicroPython -> MicroPython REPL. I mean bitterly NOTHING happens!

    I can get to REPL using CoolTerm specifying the same serial port I am using in PyCharm.

    What could I be doing wrong?

  33. David L Montigny says:

    Upon my initial test the plugin only seems to work on the initial install. Everything worked fine flashing the test script to blink the LED but cannot flash anything since.

  34. David L Montigny says:

    I entered my new files and they are in the “run” dropddown but they do nothing.

  35. Jonatao Sardinha says:

    Very nice! I have managed to get it to work, but is any way to upload to a custom folder in the micropython device? Right now it uploads to /flash, but I’d like to upload it to /flash/apps (m5stack folder where apps are installed). Thanks!

  36. Param says:

    Hi guys,

    I apologize if this sounds a stupid question.
    Can I get started with micropython if I do not have the pyboard. I will be getting it in a couple weeks?
    I installed micropython plugin and followed all the steps mentioned above.
    I am running just my python file and not flashing the pyboard but I get an error No module named ‘utime’.
    Printing hello world works But not sure whether it is Cpython or micropython
    So can this work or no?

  37. Roslan Ramli says:

    What is the device path on windows. I use COM5. Cannot auto detect. Thank you

  38. Alex says:

    Hi, thanks for the great tutorial. I’m having problem in flash .py to COM in Windows. I got the following error. Anyone can help me? Thanks.

    raise PyboardError(‘could not enter raw repl’)
    ampy.pyboard.PyboardError: could not enter raw repl..

  39. Roslan Ramli says:

    I have created a Python 3,5 environment.
    Please tell me what pip install do I need to do for micropython?
    Thank you.

  40. Kesavan T says:

    I followed all the steps properly but I can’t upload the file to the esp8266 , it is showing as uploading 0% for very long time,please address this issue

    Thanks for micropython , with my knowledge on python it is easy to use pycharm than other IDE like Ardunio.

  41. JakubS says:

    I’ve struggled a while to configure the PyCharm but finally I got it.

    Uploading works great, REPL works fine.

    But is there a way to have REPL switched on and sending files in the same time? I would like to see the serial output just after flashing the program.
    Let’s say my program prints to serial “hello world” but after flashing I must open REPL and manually reset my ESP8266 otherwise I get “…failed to access COMx”.

  42. Mark Torrico says:

    everything is working fine for me!!!, except when I upload my project files to (esp32 ttgo-t-call) excluding .idea files, PyCharm is uploading git files too. how could I exclude the .git files?

Leave a Reply to Andrey Vlasovskikh Cancel reply

Your email address will not be published. Required fields are marked *