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

为何无法在Visual Studio Code中选择全部已安装Python环境?Python3.7未显示

Fixing VS Code Not Detecting Your Manual Python 3.7 Installation

Hey Jordan, let's work through this issue—missing Python environments in VS Code is a pretty common hiccup, and we can sort it out with a few straightforward steps:

Why Your Python 3.7 Isn't Showing Up

VS Code relies on system environment variables, extension detection logic, and sometimes Conda's priority settings to find Python interpreters. If your manual 3.7 install isn't listed, it's likely one of these factors is blocking detection.

Step-by-Step Solutions

1. Manually Add the Python 3.7 Interpreter

This is the fastest way to get your 3.7 environment visible:

  • Open VS Code and press Ctrl+Shift+P (Windows) / Cmd+Shift+P (Mac) to open the command palette.
  • Type Python: Select Interpreter and hit Enter.
  • Choose the Enter interpreter path... option, then browse to C:\Python\Python3.7\python.exe and select it. Your 3.7 environment will now appear in the interpreter list.

2. Verify System PATH Environment Variables

VS Code often uses your system's PATH to find Python installations. Make sure your 3.7 path is included:

  • Right-click "This PC" → Properties → Advanced System Settings → Environment Variables.
  • Under System Variables, find the Path entry, click Edit, and add these two paths:
    • C:\Python\Python3.7\
    • C:\Python\Python3.7\Scripts\
  • Save changes and restart VS Code (or your entire computer, if needed). VS Code should now auto-detect your 3.7 environment.

3. Adjust Conda Detection Settings

If Conda is prioritized over your manual installs, tweak these VS Code settings:

  • Open VS Code settings with Ctrl+, (Windows) / Cmd+, (Mac).
  • Option A: Add your manual Python paths to the environment detection list:
    • Search for python.environmentPath, then add your paths to the array:
      "python.environmentPath": ["C:\\Python\\Python2.7", "C:\\Python\\Python3.7"]
      
  • Option B: Disable Conda auto-detection (if you don't need it):
    • Search for python.condaEnabled and set it to false, then restart VS Code.

4. Reload the Python Extension

Sometimes extension caching causes detection issues:

  • Open the command palette (Ctrl+Shift+P/Cmd+Shift+P), type Extensions: Reload Window, and hit Enter. Once the window reloads, check the interpreter list again.

5. Validate Your Python 3.7 Installation

If none of the above works, confirm your 3.7 install is functional:

  • Open Command Prompt (CMD) and run py -3.7 or C:\Python\Python3.7\python.exe. If this fails to launch the Python 3.7 shell, your installation might be corrupted. Reinstall Python 3.7 and make sure to check the Add Python to PATH box during setup.

内容的提问来源于stack exchange,提问作者Jordan Stefanelli

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.05.14 06:43:36