在WIndows 10 64位上安装Python

时间:2015-08-19 14:44:30

标签: python

我试图在我的64位Windows 10机器上安装python。我下载了最新的Python 2版本(遵循Zed Shaw的书,因此没有安装Python 3)。安装完成后,我在power shell中输入了python。但是我得到以下错误。

PS C:\> python
python : Python 2.7.10 (default, May 23 2015, 09:44:00) [MSC v.1500 64 bit (AMD64)] on win32
At line:1 char:1
+ python
+ ~~~~~~
+ CategoryInfo          : NotSpecified: (Python 2.7.10 (...MD64)] on win32:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError

Type "help", "copyright", "credits" or "license" for more information.
>>> 

shell不再需要输入。我被迫使用Ctrl + C.我知道这是非常基本的,但我似乎无法通过谷歌搜索错误来解决这个问题。

1 个答案:

答案 0 :(得分:0)

您的环境变量是否设置正确?

请参阅以下帖子中用户遇到类似问题:

I'm trying to use python in powershell

尝试在您的powershell控制台中输入:

[Environment]::SetEnvironmentVariable("Path", "$env:Path;C:\Python27", "User")

同样根据本文档,您可能需要更新您的powershell配置文件:

https://superuser.com/questions/437790/run-python-scripts-in-powershell-directly

相关问题