-
Notifications
You must be signed in to change notification settings - Fork 55
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
Can not find Python Interpreter #1774
Comments
Could you run |
Thank you Platformio seems to be installed OK |
I found the problem. The recipe of AppImage has a problem, not VSCode. Installing de .deb all works |
I am on macOS Version 12.0.1 (21A559). |
@swanlm we don't use Do you see any errors if try to install PlatformIO Core manually https://docs.platformio.org/en/latest/core/installation.html#super-quick-mac-linux ? |
@ivankravets thanks for the quick response. I get no errors when installing PlatformIO Core manually. But as soon as I open vscode it wants to install PlatformIO IDE. At that point I get "PlatformIO: Can not find working Python 3.6+ Interpreter." Aborting installation gives me: |
Could you remove |
I get the same error. I am using vscode in conjunction with Fusion 360 and wonder if this related? I saw this in the console output. console.ts:137 [Extension Host] /usr/bin/python3 Error: Python path configuration: Current thread 0x0000000109ad2600 (most recent call first):
|
Sorry, we can't provide more help. It seems that Autodesk totally broke your system. They overwrote the system Python with something own broken. You can try to remove them from your PATH in init shell script. |
If I click the "I have python" button in the dialog and select the correct interpreter (which has the venv module) it continues to try to use a different interpreter without the venv module every time the window reloads. |
After downgrading the extension to 3.2.0 everything works fine though |
I can confirm the same as @domdfcoding, I get this error with the latest version (3.3.1) but not with 3.2.0. This is a clean install in VS Code on Ubuntu 20.04 with conda (I don't have access to modify the system python and don't use it). |
We don't support |
No, because even though the docs explicitly say "PlatformIO operates without the need for administrative or sudo permissions.", the first instruction in this issue is Installing PlatformIO Core (CLI) and using only the cli commands works fine with That standalone core installation can not be used in VS Code because the installer scripts are broken if |
@BartLH, the reason why we don't support Anaconda is a custom unofficial Python distribution. As a result, many system-dependent packages that have pre-built binaries do not work with "conda". Shortly, conda's Python != official Python. They have a fork and patch Python with their own things which are not interesting for us and it is difficult to maintain them. |
its work for me after install this my ide back to normal |
This 'Cannot find Python Interpreter' issue arose while trying to remedy another mysterious unprovoked problem probably arising from OS and VS upgrades. Dutifully following all the various online advice its taken two days involving repeatedly resinstalling Linux, VS and supporting software etc. The final act was to use your 'sudo apt-get install python3.venv' command above on my Asus Chromebook. You need to flag the implications of changes and required remedies much more assiduously. I have infinite patience (and loyalty) but over the last period I've spent far more time maintaining my working environment than actually creating new code. |
Very much agree with @Utopists . I gave up and went back to Arduino IDE 1.89. Sick of spending all my time on things that I never wanted to change anyway. |
@JamesNewton, what is your OS? |
@ivankravets |
Hi I have similar issue with the system I read all the comments and apply the solutions that I thought I had similar setup. |
SOLUTION FOUND !If you're reading this, you've probably tried everything, but still cant get it to work. Worry no more! I'm 99% sure this will fix the problem we've all been facing! STEP 1: Finally, make sure to restart VSCode if it's open, and Voila! Sit back and relax, as platformIO installs as it should. |
I tried what you said but it is still not working -Vscode still can't see the python interpreter- thanks for the answer though |
@iremkalkanli , please open
or
|
Could you try to run the installer script manually? See https://docs.platformio.org/en/latest/core/installation/methods/installer-script.html#local-download-macos-linux-windows Do you see any errors? |
Could you open |
|
After long time i find that my "COMODO Firewall" was blocking platformio acess to python, check yours. |
even though the below code doesn't yield expected result, after install install venv and pip using "sudo apt install python3-venv python3-pip" the issues seems to be resolved. |
Thank you so much for this, after running sudo apt-get install python3-venv the problem was fixed on Ubuntu. I am currently learning ROS. |
Dosen't work for Windows |
I had issue to start with platformio on Ubuntu 24.04 due to missing |
Installing |
I encountered this today and just blew out all the configs in Linux, Fedora 39. venv installed, along with ensurepip. Visual Studio Code. Error: Can not find Python Interpreter. Please install Python 3.6 or above manually at MA.whereIsPython (/home/k/.vscode/extensions/platformio.platformio-ide-3.3.3-linux-x64/node_modules/platformio-node-helpers/dist/index.js:1:961177) at async MA.install (/home/k/.vscode/extensions/platformio.platformio-ide-3.3.3-linux-x64/node_modules/platformio-node-helpers/dist/index.js:1:964300) at async k.install (/home/k/.vscode/extensions/platformio.platformio-ide-3.3.3-linux-x64/dist/extension.js:1:9248) at async /home/k/.vscode/extensions/platformio.platformio-ide-3.3.3-linux-x64/dist/extension.js:1:45104... So I edited those files. Manually removed the error throws. Got this. Looking for envs Cannot read properties of undefined (reading 'envs') Linux, Fedora 39. venv installed, along with ensurepip. Visual Studio Code. I clicked around on some more errors and got sent here, where it said to install pio home. platformio/platformio-vscode-ide#3408 Now PlatformIO comes up in Firefox. Restarted VSCode. Still stuck at Installing PlatformIO Core. I think trying to make it work inside VSCode is a dead end. The website says I can run |
Solution
If you use PlatformIO IDE, please ensure that platformio-ide.useBuiltinPython option is enabled (set to
true
).Windows and macOS
PlatformIO IDE comes with built-in portable Python 3 for Windows and macOS. YOU DO NOT NEED to install Python interpreter manually. If you use PlatformIO IDE and experience this issue, please navigate to
%HOME%/.platformio/python3
folder and check thatpython.exe
(Windows) orbin/python
works on your machine.In case if they don't work, please install manually the latest Python 3 using this guide. Restart PlatformIO IDE (VScode).
Linux
Please install the following package and restart IDE:
If you use a custom Python version, then
where
python3.xx
equals the version of your Python interpreter (check it viapython3 --version
). For example,python3.10-venv
for Python 3.10.Now, please check your Python installation:
I still experience this issue
If you still experience this issue, please leave a comment below and describe your configuration (operating system, its version, etc.). We would be glad to help you.
Regards,
Your friends at PlatformIO.
%23 Configuration
VSCode: 1.61.2
PIO IDE: v2.3.4
System: Windows_NT, 10.0.19043, x64
%23 Exception
The text was updated successfully, but these errors were encountered: