Skip to content

Commit 73836c5

Browse files
committed
Ensure that PIO Core was installed using Python 3
1 parent 86f47ee commit 73836c5

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

get-platformio.py

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

pioinstaller/core.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,10 +248,20 @@ def check(dev=False, auto_upgrade=False, version_spec=None):
248248

249249

250250
def fetch_python_state(python_exe):
251-
code = """import platform
251+
code = """
252252
import json
253+
import platform
254+
import sys
255+
253256
import platformio
254257
258+
if sys.version_info < (3, 6):
259+
raise Exception(
260+
"Unsupported Python version: %s. "
261+
"Minimum supported Python version is 3.6 or above."
262+
% platform.python_version(),
263+
)
264+
255265
state = {
256266
"core_version": platformio.__version__,
257267
"python_version": platform.python_version()

0 commit comments

Comments
 (0)