Cmd Windows“python”命令有效,但“python3”无效,尽管我的python版本是3.6

Eul*_*ter 5 python windows cmd anaconda windows-10

所以我在这里关注了几个帖子,比如这个

所以我已经用 Anaconda 安装了 python 3.6。然后我进入 PATH 并插入 Python 的路径。

所以现在当我输入cmd“python”时,我得到了响应

Python 3.6.3 |Anaconda custom (64-bit)| (default, Oct 15 2017, 03:27:45) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
Run Code Online (Sandbox Code Playgroud)

但是,如果我输入“python3”,我会遇到常见的问题

'python3' is not recognized as an internal or external command,
operable program or batch file.
Run Code Online (Sandbox Code Playgroud)

这是为什么?

trk*_*trk 7

您的问题可能已经得到解答;请参阅以下答案:Python 3 installation on windows running from command line。具体来说:

OSX 和 Linuxpython作为规则默认安装了可执行文件,目前在大多数情况下它指的是 Python 2 版本,这就是为什么你需要一个单独的python3名称。

默认情况下,Windows 上没有 Python。因此,您安装的任何版本都只是python(我猜)。管理多个 Python 版本的推荐方法是使用 Python 启动器。

TL;DR:python3不是 Windows 上的有效命令,无论它随附的发行版如何(在您的情况下是 Anaconda)。