Python 3.6 无法在 Windows 10 上运行

Python 3.6 无法在 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 似乎安装成功了(我选择“将 Python 3.6 添加到路径”)。我点击“立即安装”。

我运行 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>

有人能建议我该怎么做才能安装 Python 3.6 吗?

答案1

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

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

相关内容