gpt4 book ai didi

python - VScode 看不到 pyenv python 解释器

转载 作者:行者123 更新时间:2023-12-03 20:46:03 24 4
gpt4 key购买 nike

我安装了 pyenv-win在我的 Windows 机器上。它在命令行中工作正常。我可以安装 python 版本,将它们设置为全局等。但是我的 VS Code 没有看到它们。它只看到我很久以前安装的一个 python 解释器,当时我还没有使用 pyenv。
代码:
enter image description here
pyenv:

C:\Users\jbron\cmder
λ pyenv versions
3.7.0
* 3.8.0 (set by C:\Users\jbron\.pyenv\pyenv-win\version)
为什么找不到我的 pyenv 解释器?我的 Linux 机器上没有这样的问题

最佳答案

建议您尝试以下操作:

  • 请检查 Python 环境变量是否包含您安装的 Python 路径:
    enter image description here
  • 安装后请重新打开 VSCode:
    enter image description here

  • 更新:
    我使用的“pyenv”的环境变量路径是:(在这个路径下可以找到pyenv下载的Python 3.6.7)
    enter image description here
    enter image description here
    我们可以看到它下载的存储位置 Python 3.6.7 :
     C:\Users\...\.pyenv\pyenv-win\install_cache\python-3.6.7-amd64-webinstall.exe
    双击安装:
    enter image description here

    关于python - VScode 看不到 pyenv python 解释器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65563332/

    24 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com