Hey! I have previously used PlatformIO on older versions of python (around 2.7) a couple of years ago, and now I wanted to start using it again.
I did a fresh pip install platformio
on Python 3.7.3, and then I created a new project pio init --board uno
and tried to compile pio run
. I get the following error:
File "C:\Users\User\.platformio\platforms\atmelavr\builder\main.py", line 30
print "Please unplug/plug device ..."
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Please unplug/plug device ...")?
Which of course means that it’s trying to run some Python 2 code on my Python 3. How does that happen? I thought PlatformIO was Python 3 compatible?
Interestingly everything seems to work fine if I change that single line of source code.