Python 3.6 不能在 Windows 10 上运行

Duk*_*gal -1 windows powershell python windows-10

使用 Windows 10。

首先,我卸载任何现有版本的 Python 3 或 Python 2.0

https://www.python.org/ftp/python/3.6.0/python-3.6.0-amd64.exe

然后我运行上面的程序,Windows好像安装好了(我选择“Add Python 3.6 to the path”)。我点击“立即安装”。

我运行 Windows Powershell。

我输入 python3 并没有任何反应。

PS C:\Users\d> python
python : The term 'python' is not recognized as the name of a cmdlet, function, script file, or operable progr
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ python
+ ~~~~~~
    + CategoryInfo          : ObjectNotFound: (python:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

PS C:\Users\d> python3
python3 : The term 'python3' is not recognized as the name of a cmdlet, function, script file, or operable pro
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ python3
+ ~~~~~~~
    + CategoryInfo          : ObjectNotFound: (python3:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

PS C:\Users\d>
Run Code Online (Sandbox Code Playgroud)

谁能建议我可以做些什么来安装 Python 3.6?

Duk*_*gal 5

对于后面的人来说,为了让 Python 能够在 Windows 上运行,在安装过程中选择默认选项是不够的。

您必须选择自定义 - 我不知道我在自定义中选择了哪个选项,但我安装到 c:\python36 并为所有用户安装并告诉它设置路径,然后它就可以工作了。

  • 设置路径是您实际需要做的唯一事情,我不知道为什么默认情况下不启用它... (2认同)