candidatemap
candidatemap

Reputation: 81

Python script in Powershell: Remote Exception and NativeCommandError

I'm at the very beginning of learning to code in Python (and first time using Powershell), so I assume my problem is very basic. When I try to run any Python script in PS, I get an error like the one below. The main suggestions I've found online are to (1) make sure I've set execution policy to unrestricted, and (2) edit my Path to include "c:\Python27;c:\Python27\Scripts" I've done both these things. What else should I try?

   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.

Upvotes: 8

Views: 8662

Answers (1)

Reader 1024
Reader 1024

Reputation: 111

This could be due to a 64bit/32bit mismatch. Try running the python command in "Powershell (x86)" assuming your were using the 64bit "Powershell" or "Powershell ISE".

Upvotes: 11

Related Questions