Powershell : Remote Exception and NativeCommandError 中的 Python 脚本

标签 python powershell remoteexception

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

   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.

最佳答案

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

关于Powershell : Remote Exception and NativeCommandError 中的 Python 脚本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22390395/

相关文章:

powershell - 显示转义字符的回显字符串

android - 随机关闭应用程序 - InputManagerService : Got RemoteException sending setActive(false) notification

Android RemoteExceptions 和服务

Java RMI 简单的 Hello World 程序抛出 RemoteException

wpf - 如何使用 powershell 将 SQL 数据导入 WPF DataGrid?

python - 尝试将python的Google视觉响应转换为字典时出现属性错误DESCRIPTOR

python - 来自大型无序 csv 文件的 dask set_index

python - 使用 boost.python,如何扩展类的 __dir__ 函数?

Powershell模拟键盘

python - Docker+Gunicorn+Flask,我不明白为什么我的设置不起作用