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

多Python版本混淆求助:多版本共存及uv venv自动使用未安装CPython 3.13的原因排查

Hey there, let's break down your questions one by one to clear up the confusion!

Why do where python and py -0p show different Python versions?

First, let's clarify what each command does and why their outputs differ:

  • where python scans your system's PATH environment variable for executable files named python.exe. It only returns paths that are explicitly added to your PATH, which is why it only shows two entries:

    • The first path (C:\Users\SamuelPC\AppData\Local\Microsoft\WindowsApps\python.exe) points to the Python version installed via the Microsoft Store. This installation automatically adds itself to your system PATH during setup.
    • The second path (C:\Users\SamuelPC\AppData\Local\Python\bin\python.exe) is likely a version you installed directly from python.org (or another non-Microsoft Store source), which also added itself to your PATH.
  • py -0p is a command for the Python Launcher for Windows—a tool bundled with most Python installations on Windows. Unlike where, it doesn't rely solely on PATH; it scans your entire system for all registered Python installations (including those not added to PATH). That's why it shows extra versions like Python 3.11—this version is installed on your system but wasn't added to your PATH, so where can't detect it.

Looking at your output:

  • The 3.14 entry from py -0p points to C:\Users\SamuelPC\AppData\Local\Python\pythoncore-3.14-64\python.exe—this is the actual executable behind the bin\python.exe path returned by where (it's probably a symlink or shortcut).
  • The 3.12 entry matches the Microsoft Store installation path from where.
  • The 3.11 version lives in C:\Users\SamuelPC\AppData\Local\Programs\Python\Python311\python.exe—a standalone installation that wasn't added to your PATH.

Why did uv venv use CPython 3.13.0 automatically?

First, let's define CPython: CPython is the standard, reference implementation of Python—it's the version you download from python.org, get via the Microsoft Store, or use in most everyday scenarios. Other implementations like PyPy (optimized for speed) or Jython (runs on the JVM) exist, but CPython is the default and most widely used.

As for why uv venv picked 3.13.0 even though you don't remember installing it, here are the most likely explanations:

  1. uv's built-in version management: uv is a modern Python environment and package manager that maintains its own cache of Python versions. If it doesn't find a suitable version in your PATH or registered installations that meets its default requirements, it will automatically download a compatible CPython version (in this case, 3.13.0) and store it in its private cache directory. This version isn't added to your system PATH, which is why where and py -0p don't show it.

  2. Cached version from past use: Even if you don't recall installing Python 3.13, you might have run a previous uv command that triggered a download of 3.13.0. uv caches these versions to avoid re-downloading them repeatedly.

  3. Project-specific configuration (less likely): Double-check if your project folder has a .python-version file or pyproject.toml that specifies Python 3.13. If so, uv would use that version automatically. But since you mentioned never installing 3.13 manually, this is a less probable scenario.

To confirm the exact location of uv's cached 3.13.0 version, run this command:

uv python locate 3.13.0

内容的提问来源于stack exchange,提问作者Samuel Gonzalez

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.04.27 09:27:42