Cmd Windows“ python”命令有效,但“ python3”不会,尽管我的python版本是3.6 [英] Cmd Windows "python" command works, but "python3" doesn't although my python version is 3.6

查看:432
本文介绍了Cmd Windows“ python”命令有效,但“ python3”不会,尽管我的python版本是3.6的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,我在这里关注了几篇文章,例如

So I have followed a couple of posts here such as this.

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

So I have installed python 3.6 with Anaconda. Then I went into the PATH and I inserted the path to Python.

所以现在当我在cmd python中键入命令时,我得到了响应

So now when I type into the cmd "python" I get the response

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.
>>>

但是,如果我键入 python3,则会遇到常见问题

However if I type in "python3" I get the usual problem

'python3' is not recognized as an internal or external command,
operable program or batch file.

为什么?

推荐答案

您的问题可能已经回答;请参见此答案:在从命令行运行的Windows上安装Python 3 。具体来说:

Your question may have already been answered; see this answer to: Python 3 installation on windows running from command line. Specifically:


OSX和Linux通常默认安装 python 可执行文件
,并且在大多数情况下,它指的是Python 2版本,这就是
为何在这里需要单独的 python3 名称。

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

There is no Python on Windows by default. And therefore any version that you've installed is just python (I guess). The recommended way to manage multiple python versions is to use the Python launcher.

TL; DR: python3 在Windows上不是有效的命令,无论其附带的分发版本(在您的情况下为Anaconda)。

TL;DR: python3 is not a valid command on Windows, regardless of the distribution that it comes with (Anaconda in your case).

这篇关于Cmd Windows“ python”命令有效,但“ python3”不会,尽管我的python版本是3.6的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆