VS Code Python解释器即使显示了3.9更新,仍然显示3.8.6吗?

问题描述

即使Microsoft商店版本的python说3.9更新已发布并且已经安装了它,看来我仍在使用Python 3.8.6。如何使用Microsoft商店中的新版本?我尝试过多次重新安装,然后尝试从python网站安装,但是遇到一个由于某种原因无法安装库的问题。

No other interpreter option is shown:

解决方法

要解决此问题,请执行以下操作

  1. 转到Python's official website,下载最新版本的python 3.9。

  2. 删除.vscode文件夹并重新启动编辑器。

  3. 在下拉菜单中选择python版本为3.9。

警告:python 3.9在Windows 7及更低版本的Windows 7上将不起作用

,

我在计算机上尝试了此过程:

  1. 下载python3.9。我在安装前检查了“ role="list item"

    enter image description here

    它会自动将Add Python3.9 to PATH添加到系统的环境变量中:

    enter image description here

  2. 在VSCode中打开python解释器:

    enter image description here

建议您在cmd窗口中输入“ python3.9”,以检查where python是否可用。此外,请使用最新版本的VSCodePython extensions。(2020.10.332292344)

enter image description here