首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Powershell中的Python脚本:远程异常和NativeCommandError

Powershell中的Python脚本:远程异常和NativeCommandError
EN

Stack Overflow用户
提问于 2014-03-14 04:39:09
回答 1查看 5.5K关注 0票数 8

我刚开始学习用Python编写代码(也是第一次使用Powershell),所以我认为我的问题非常基础。当我尝试在PS中运行任何Python脚本时,我得到如下所示的错误。我在网上找到的主要建议是(1)确保我已经将执行策略设置为无限制,(2)编辑我的路径以包括"c:\Python27;c:\Python27\Scripts"我已经做了这两件事。我还应该尝试什么?

代码语言:javascript
复制
   PS C:\windows\system32> python
python.exe : Python 2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit (Intel)] on win32
At line:1 char:7
+ python <<<< 
    + CategoryInfo          : NotSpecified: (Python 2.7.6 (d...ntel)] on win32:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError


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

回答 1

Stack Overflow用户

发布于 2018-02-04 04:52:23

这可能是由于64位/32位不匹配造成的。假设您使用的是64位的"Powershell“或"Powershell ISE”,请尝试在"Powershell (x86)“中运行python命令。

票数 9
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/22390395

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档