question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Guide: Running Deviot with ST3 / ST4, PlatformIO 5, and Python 3.6+

See original GitHub issue

Hi all,

Just figured I’d post this here as a solution to potentially many of your problems with running Deviot since PIO ended support for python 2.7/3.5 and lower. I’ve used these steps on ST3 and ST4 for Windows 10, and ST4 for macOS 11(.6)

For simplicity’s sake, start from scratch

  • Remove Deviot from Sublime if you have it installed already (Package Control > Remove Package > Deviot)
  • ~~If you are on mac and have/had the dev branch installed, unfortunately I don’t think it works with these instructions. If someone figures out a solution to that then let us know here! Removal is of course: Package Control > Remove Repository > https://rawgit.com/gepd/Deviot/master/repository.json~~ (2022-01-09) I’ve figured out how to get the dev branch working now, see below in Optional and #337 (this is required if you want to upload to boards which don’t use Serial for upload)
  • If you’re on mac and have installed PlatformIO via their get-platformio.py script, my understanding is you’ll need to remove it. I had to use the Homebrew install, and I’m not sure how this goes if you’ve already got the regular install in place. pip uninstall platformio in the terminal of course.

Next step, Python

  • If you have 2.7 and 3.6+ installed already, you may need to re-install your 3.6+ version to make sure it has precedence over 2.7 (I’m not really that familiar with python so this may not strictly be necessary)
  • If you don’t have Python 2.7 and/or 3.6+ installed, install them however you like (e.g. via https://www.python.org/downloads/). As above, make sure 3.6+ is installed/reinstalled after 2.7. My understanding is that you do need both versions, but please correct me if I’m wrong, it’s always nice to minimise install overheads. In #320 and #323 people have mentioned they have it working in mac/Windows without 2.7, I haven’t tested scientifically enough.

Then on to PlatformIO macOS

  • Install platformio via Homebrew. This seems to be important, I could not get it to work by installing PIO via their get-platformio.py script.
  • If you don’t have Homebrew already, it can be installed by running (in terminal): /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  • If it requests you install the Command Line Tools for Xcode, go ahead with that
  • Then install platformio: brew install platformio

Windows

  • It’s been quite a few months since I did this, but IIRC you may be able to get away with the PIO install created by Deviot. Check if you have a .platformio folder in your user directory e.g. C:\Users*username*.platformio. If not…
  • Install PIO using their instructions here: https://docs.platformio.org/en/latest/core/installation.html#id30

Both

Finally, back in Sublime Text

  • Install Deviot: Package Control > Install Package > Deviot

Optional:

  • Switch to Dev branch for most up to date version of Deviot. Instructions here: https://github.com/gepd/Deviot/wiki/Setup#developer As I mentioned above, this seems to break the mac install such that the Deviot menu disappears even though Package Control says it’s installed.
  • Then see #337 for how to get the menus and syntax highlighting working again.

Hope this all helps!

Edit 2021-12-19 It seems you might be able to remove pio from PATH after doing all this. QyuriLa (in post #issuecomment-996787420) and I (in the post after) both seem to have found PATH is not required…

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:1
  • Comments:10

github_iconTop GitHub Comments

1reaction
gianlucaf81commented, Jun 29, 2022

OMG! after years, with this guide, I was able to get it working again. thx

1reaction
hijomojocommented, Jan 9, 2022

@QyuriLa

It seems that it happens on Windows (or at least my PC) too. … I ended up staying in the stable release (2.2.2), though.

I actually just ran into this issue when upgrading one of my Windows machines from stable to dev version 2.3.0.dev13, too! I’ve just figured out what happened and how to fix it … basically, the dev installer fails to create a few files but you can manually replace them. Here’s a link to my solution: #337

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error: Python 3.6 or later is required for this operation
Hello, I'm using Platformio with Sublime text 3 and Deviot. When I try to compile a projet I get this message: “Error: Python...
Read more >
Sublime Text — PlatformIO v6.1 documentation
We are glad to inform you about an awesome Sublime Text plugin for IoT development named Deviot. It is based on PlatformIO Core...
Read more >
Raspberry Pi OS - Error: Python 3.6 or later is required for this ...
HI I got that error trying to run platformio with VSCode : pi@raspberrypi:~ $ pio system info Error: Python 3.6 or later is...
Read more >
Force Platformio to use Python3?
I think the issue is due to Platformio still using python 2 ... for PlatformIO Core 5.x is Python 3.6 so I think...
Read more >
PlatformIO Core (CLI) — PlatformIO v6.1 documentation
Integration components (Cloud & Desktop IDEs and Continuous Integration). PlatformIO Core is written in Python and works on Windows, macOS, Linux, FreeBSD and ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found