Python Scripting Engine Missing

Discussions concerning programming of SOFTIMAGE©
Post Reply
Serev
Posts: 3
Joined: 30 Sep 2011, 20:12

Python Scripting Engine Missing

Post by Serev » 01 Oct 2011, 20:14

Hi Everyone,

I'm new to Softimage and wanted to learn it's scripting language for a project I'm working on. I mainly code in Python, but as soon as i select Python in the script editor i get this error:

Code: Select all

# ERROR : 2000 - Failed creating scripting engine: XSI.SIPython.1.
# pythoncom error: PythonCOM Server - The 'win32com.server.policy' module could not be loaded.
# Traceback (most recent call last):
#   File "C:\Program Files\Python26\Lib\site-packages\win32com\__init__.py", line 6, in <module>
#     import pythoncom
#   File "C:\Program Files\Python26\Lib\site-packages\pythoncom.py", line 2, in <module>
#     import pywintypes
# <type 'exceptions.ImportError'>: No module named pywintypes
# pythoncom error: CPyFactory::CreateInstance failed to create instance. (80004005)
I understand its not finding the python scripting engine(i think), but does anyone know how to fix it? I found something about editing the registry key for HKEY_LOCAL_MACHINE\SOFTWARE\Python, but i don't even have that folder in my registry. I have the PYTHONPATH environment variable set correctly, and have the Python directory added to the Path variable as well. I think that version of python might be 32bit and I'm running Softimage 2012 64bit on Win7 64bit, but shouldn't Softimage look for/use the distribution of Python in its installation directory?
Thanks so much. :)

Also, sorry if this doesn't belong here.

User avatar
Hirazi Blue
Administrator
Posts: 4915
Joined: 04 Jun 2009, 12:15

Re: Python Scripting Engine Missing

Post by Hirazi Blue » 01 Oct 2011, 22:14

Are you using the "Python Installed with Softimage" (it's in the Scripting Preferences)?

If you're instead using the "external" Python, did you install pywin32 as well?
Look at this older blog entry: Getting Python to show up in Softimage
...

Serev
Posts: 3
Joined: 30 Sep 2011, 20:12

Re: Python Scripting Engine Missing

Post by Serev » 02 Oct 2011, 20:27

Hmmm. Installing the 64bit python seemed to make it work, even thought I have "Python Installed with Softimage" checked and it shouldn't be looking outside the Softimage directory for Python. The only problem, and the reason I didn't want to install a 64bit version of Python again, is I need a 32bit version of python for when I use blender. Apparently, whichever version of Python is installed the most recent is the one that gets used. 64bit Python doesn't seem to like 32bit PyFFI, or the 64bit PyFFI for that matter, but i'll worry about that later.
Thanks for the help ^^

User avatar
Hirazi Blue
Administrator
Posts: 4915
Joined: 04 Jun 2009, 12:15

Re: Python Scripting Engine Missing

Post by Hirazi Blue » 02 Oct 2011, 20:33

And if you were to install a 32 bit Python 3, which Blender supports AFAIK,
would this still conflict with your "2.6" Python x64 install?
:-\
...

Serev
Posts: 3
Joined: 30 Sep 2011, 20:12

Re: Python Scripting Engine Missing

Post by Serev » 04 Oct 2011, 20:05

I'm not sure if it would conflict, but i'm pretty sure i have to use Python 2.6 and Blender 2.49 because that's what the plugin was written for.
And I don't believe Blender 2.49 works with Python 3.
It's not that much of an issue really, i only use Blender a little for modding if it's something small like repositioning verts. 3DS Max doesn't tend to like that very much.

Thanks for the help though. I'd much rather have Python working in Softimage, not sure why it's not using the version in the install directory but whatever.

User avatar
Hirazi Blue
Administrator
Posts: 4915
Joined: 04 Jun 2009, 12:15

Re: Python Scripting Engine Missing

Post by Hirazi Blue » 04 Oct 2011, 20:26

Ah, you're probably right, only the most recent Blender builds were made with Python 3 in mind...
...

anclib
Posts: 6
Joined: 26 Jan 2011, 18:15

Re: Python Scripting Engine Missing

Post by anclib » 15 Oct 2011, 22:17

I'm having a similar problem, I wanted to add a library to the python within Softimage 2012sap on Windows 7 64bit, so to add serial coms, but don't seem to be able to achieve it.
I have tried to get Soft to use an external version of python, did not work.
The external Python 3.2 updated the library no problem
I have tried changing registry key to redirect the install, but the update crashes for some strange reason and does not install the library.
I thought I may be a stupid permissions thing (windows 7 system is infuriating)so fiddled about with the folders, did not work.

why does Softimage give you the option of using an external editor if it's not possible?
Why can't I manually add libraries to python?

Surly somebody out there knows how to fix this.

User avatar
Hirazi Blue
Administrator
Posts: 4915
Joined: 04 Jun 2009, 12:15

Re: Python Scripting Engine Missing

Post by Hirazi Blue » 15 Oct 2011, 22:59

If it's a library specifically written for Python 3.2, maybe there's your problem, as the built-in Softimage-Python is 2.6 AFAIK (but definitively not of the 3.x generation).
Getting an "external" Python to work in Softimage will only succeed if the Python & the corresponding pywin32 are from the 2.6+ generation, not of the 3.x generation...
Again: Getting Python to show up in Softimage ;)
...

anclib
Posts: 6
Joined: 26 Jan 2011, 18:15

Re: Python Scripting Engine Missing

Post by anclib » 16 Oct 2011, 20:23

No it's the correct python and update version. I've also tried Python 2.7 64bit external version. I've tried all the solutions posted on Softimage wiki
I'm running Softimage 2012 64bit on Windows 7 64bit

User avatar
Hirazi Blue
Administrator
Posts: 4915
Joined: 04 Jun 2009, 12:15

Re: Python Scripting Engine Missing

Post by Hirazi Blue » 16 Oct 2011, 20:30

From your previous post I gather you're also running Python 3.2 side by side?
Do they both (external 2.6 and 3.2) have entries in the registry?

edit: but maybe you just need this:
Installing Python modules in the Softimage Python site-packages,
which describes the procedure to add/create a registry entry for the internal Python
to use with those Python-module-installers that find "their" Python via said registry...
...

User avatar
xsisupport
Posts: 713
Joined: 09 Jun 2009, 11:02
Location: Montreal Canada
Contact:

Re: Python Scripting Engine Missing

Post by xsisupport » 18 Oct 2011, 12:00

anclib wrote:I'm having a similar problem, I wanted to add a library to the python within Softimage 2012sap on Windows 7 64bit, so to add serial coms, but don't seem to be able to achieve it.
I have tried to get Soft to use an external version of python, did not work.
The external Python 3.2 updated the library no problem
I have tried changing registry key to redirect the install, but the update crashes for some strange reason and does not install the library.
I thought I may be a stupid permissions thing (windows 7 system is infuriating)so fiddled about with the folders, did not work.

why does Softimage give you the option of using an external editor if it's not possible?
Why can't I manually add libraries to python?

Surly somebody out there knows how to fix this.
What Python library are you trying to add?
Is it pyserial 2.5?

If so, there is no 64-bit version of that library (I see only 32-bit at http://pypi.python.org/pypi/pyserial).

So, you'll need to install 32-bit Softimage.
Then install the 2.x version of pyserial (Softimage does not support Python 3.x).

Since you are running on a 64-bit system, the 32-bit Python registry key will be under the Wow6432Node:
HKLM\Software\Wow6432Node\Python\PythonCore

UPDATE: Also, Softimage doesn't "revert" to the internal version. If you set the preference to use the version of Python installed on the system, you'll either get that Python, no Python, or an error. At least that is what I've seen on my own system.
// Steve Blair
// "You're not a runner, you're just a guy who runs" -- my wife
//
// My Blogs: Arnold | Softimage

User avatar
Hirazi Blue
Administrator
Posts: 4915
Joined: 04 Jun 2009, 12:15

Re: Python Scripting Engine Missing

Post by Hirazi Blue » 18 Oct 2011, 12:17

xsisupport wrote:Is it pyserial 2.5?

If so, there is no 64-bit version of that library (I see only 32-bit at http://pypi.python.org/pypi/pyserial).
Not necessarily: I found this entry at the Unofficial Windows Binaries for Python Extension Packages
;)
...

User avatar
xsisupport
Posts: 713
Joined: 09 Jun 2009, 11:02
Location: Montreal Canada
Contact:

Re: Python Scripting Engine Missing

Post by xsisupport » 18 Oct 2011, 12:24

Hirazi Blue wrote:
xsisupport wrote:Is it pyserial 2.5?

If so, there is no 64-bit version of that library (I see only 32-bit at http://pypi.python.org/pypi/pyserial).
Not necessarily: I found this entry at the Unofficial Windows Binaries for Python Extension Packages
;)
Cool.

Someone logged a support case specifically referencing http://pypi.python.org/pypi/pyserial as the module they were trying to install, so I went with that.
It would explain problems getting the module into 64-bit Softimage.

I didn't try the 64-bit prerelease version you found, but I would expect you'd be able to get that into 64-bit Softimage.
// Steve Blair
// "You're not a runner, you're just a guy who runs" -- my wife
//
// My Blogs: Arnold | Softimage

User avatar
rray
Moderator
Posts: 1442
Joined: 26 Sep 2009, 15:51
Location: Bonn, Germany
Contact:

Re: Python Scripting Engine Missing

Post by rray » 27 Oct 2011, 17:39

For completeness & reference 8-x ...

I'm using "Python Installed with Softimage", and just had it disappear after uninstalling an older version of Softimage.

"runonce.bat" fixed that.
Softimage Resources section (formerly known as rray.de/xsi) updated Oct 01 2017

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests