Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.
like image 625
candidatemap Avatar asked Mar 13 '14 20:03

candidatemap


1 Answers

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".

like image 164
Reader 1024 Avatar answered Oct 11 '22 12:10

Reader 1024