You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Atom中PlatformIO-IDE-Terminal无法运行Python的问题求助

Fixing "python3 is not recognized" Error in platformio-ide-terminal for Atom

Hey there, let's get this sorted out quickly! The error you're seeing is super common on Windows systems, and it boils down to a simple difference in how Python is called between operating systems.

Why this happens

On Linux and macOS, the command to run Python 3 is typically python3, but Windows uses just python by default for Python 3 installations. That's why your terminal can't find the python3 command—it doesn't exist in your Windows environment unless you explicitly set it up.

Quick Fixes to Run Your Script

  1. Use the Windows-compatible command
    Instead of typing python3 myfile.py, run this command in your platformio-ide-terminal:

    python myfile.py
    

    This should execute your script right away if Python is properly installed and added to your system PATH.

  2. Set up a python3 alias (optional)
    If you prefer using python3 out of habit, you can create an alias for it:

    • Temporary alias (PowerShell):
      Run this command in your terminal to set a one-time alias that lasts until you close the terminal:
      New-Alias -Name python3 -Value python
      
    • Permanent alias (PowerShell):
      To make the alias stick across sessions, edit your PowerShell profile:
      1. Run notepad $PROFILE in PowerShell to open the profile file.
      2. Add the line New-Alias -Name python3 -Value python to the file.
      3. Save and close the file, then restart your Atom terminal.
    • Using a symbolic link:
      You can also create a python3.exe shortcut pointing to your existing python.exe:
      1. Find your Python installation folder (e.g., C:\Users\Angus\AppData\Local\Programs\Python\Python312).
      2. Open Command Prompt as Administrator, then run:
        mklink "C:\Users\Angus\AppData\Local\Programs\Python\Python312\python3.exe" "C:\Users\Angus\AppData\Local\Programs\Python\Python312\python.exe"
        
      3. Make sure this folder is in your system PATH, and restart Atom.
  3. Verify Python is in your system PATH
    If even python myfile.py doesn't work, chances are Python isn't added to your system's environment variables:

    • Open System Properties → go to the Advanced tab → click Environment Variables.
    • In the System variables section, find the Path variable and click Edit.
    • Add your Python installation folder (e.g., C:\Users\Angus\AppData\Local\Programs\Python\Python312) and its Scripts subfolder to the list.
    • Click OK to save changes, then close and reopen your Atom terminal.

Test it out

To confirm everything works, run python --version (or python3 --version if you set up the alias) in your terminal. You should see your installed Python version number printed out—this means you're good to go!

内容的提问来源于stack exchange,提问作者Angus Campbell

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.28 06:36:52