Closed pitosalas closed 3 years ago
What is your OS? Do you use PlatlformIO IDE for VSCode?
I'm on Ubuntu. And I am just using the command line, and in fact am struggling a little because the PlatformIO cli keeps saying I have the wrong python even though I now have installed 3.6. It's a path problem which I am sure I can solve but really all I want to do is to refresh my teensy. The command I am issuing is
$ platformio run --target upload
And I am getting:
Error: Python 3.6 or later is required for this operation. Please check a migration guide: https://docs.platformio.org/en/latest/core/migration.html#drop-support-for-python-2-and-3-5
Pito Salas Faculty, Computer Science Brandeis University
On Feb 10, 2021, at 11:21 AM, Ivan Kravets notifications@github.com wrote:
What is your OS? Do you use PlatlformIO IDE for VSCode?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
Please perform 3 steps and the issue will be resolved:
I followed those steps and it is still giving the error message:
echo $PATH /home/ubuntu/.platformio/penv/bin:/home/ubuntu/bin:/home/ubuntu/.local/bin:/home/ubuntu/.platformio/penv/bin:/opt/ros/kinetic/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin [PI]~/linorobot_ws/src/linorobot/teensy/firmware$ python --version Python 2.7.12 [PI]~/linorobot_ws/src/linorobot/teensy/firmware$ python3 --version Python 3.6.8 [PI]~/linorobot_ws/src/linorobot/teensy/firmware$ [PI]~/linorobot_ws/src/linorobot/teensy/firmware$ platformio run --target upload Error: Python 3.6 or later is required for this operation. Please check a migration guide: https://docs.platformio.org/en/latest/core/migration.html#drop-support-for-python-2-and-3-5 [PI]~/linorobot_ws/src/linorobot/teensy/firmware$
Pito Salas Faculty, Computer Science Brandeis University
On Feb 10, 2021, at 1:59 PM, Ivan Kravets notifications@github.com wrote:
Please perform 3 steps and the issue will be resolved:
• Remove existing PlatformIO Core https://docs.platformio.org/en/latest/faq.html#multiple-platformio-cores-in-a-system • Check that you have this venv package platformio/platformio-core-installer#85 • Install PlatformIO Core using official installer https://docs.platformio.org/en/latest/core/installation.html#installer-script — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
2-nd step. sudo apt-get install python3-venv
?
then
python3 -c "$(curl -fsSL https://raw.githubusercontent.com/platformio/platformio/master/scripts/get-platformio.py)"
Thanks, I got it to work. Unfortunate that they decided to de-support python2.7 because I think many in the ROS robotics work are on that!
This may be a terrible idea, but I just updated platformIO and was kind of tripped up by needing to install Python 3.7 to allow me to simply update my teensy. If the code still works with python2.x but you don't want to support it, it would be nice, as long as feasible to allow me to take the risk and still run it on 2.x, for example with a switch "--unsupportedpython