Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.1.2 Opensuse Leap 15.5 and Python 3.6 #8974

Closed
YoGitpp opened this issue Aug 17, 2023 · 1 comment
Closed

3.1.2 Opensuse Leap 15.5 and Python 3.6 #8974

YoGitpp opened this issue Aug 17, 2023 · 1 comment

Comments

@YoGitpp
Copy link

YoGitpp commented Aug 17, 2023

Hello,

My configuration

My distribution uses Python 3.6 and your script is compatible with Python >= 3.7

I can install other versions 3.9, 3.10, 3.11
e.g. sudo zypper install python39
or python310 or python311
But my shortcut python3 is still on Python 3.6.
For system dependency reasons, it is not recommended to change this.

For Python 3.9, I need to run the python3.9 command.

I modified the file :
/home/xxx/.arduino15/packages/esp8266/tools/python3/3.7.2-post1/python3

#!/usr/bin/env python3
import os
import sys

--args = ["env", "python3"] + sys.argv[1:];
++args = ["env", "python3.11"] + sys.argv[1:];
os.execv("/usr/bin/env", args)

And now it work !

Sincerely

@mcspr
Copy link
Collaborator

mcspr commented Sep 14, 2023

Note the env, we select the python3 based on $PATH order. Modifying environment for IDE should fix the issue (for example, using venv. or, manually do what it does)

Another option is $ESP8266_ARDUINO_PYTHON_PATH (see earlephilhower/esp-quick-toolchain#48 and #8886), but only for versions after 3.1.2

@mcspr mcspr closed this as completed Sep 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants