Well, Tom, Get your plasma rifle ready! :D:
Actually, I did get SOMEWHERE… but alas I’m not up and running. I think I’m building it wrong. :tear:
So I’ve added the path to the the three files to sys.path in the userPrefs.py file:
-clr.pyd
-Python.Runtime.dll
-Python.Test.dll (i’ve also tested without this file in all combinations)
like this:
sys.path.append(“<path to file…>”);
I’ve tried building it in a number of different forms.
No matter how I build it, it doesn’t seem to work.
-I tried the files that came with the pythonnet zip file (even though I knew from what you’ve written elsewhere that it wouldn’t work) and I get this message when I try to “import clr”:
Error: dynamic module does not define init function (initclr)
Traceback (most recent call last):
File “<maya console>”, line 1, in <module>
ImportError: dynamic module does not define init function (initclr)
- I’ve also tried building (from the Visual Studio solution) in all permutations of the following:
PYTHON25
PYTHON26
(According to the docs, maya 2009 uses Python 2.5.1, so PYTHON25 should be right…)
UCS2
UCS4
and with different Platform Targets:
-“Any CPU”
-“x86”
-“x64”
Result: Nada. In all cases, running “import CLR” results in a maya crash, again with “GetCLRFunction()” on the top of the callstack.
I am trying to build the “pythonnet-2.0-alpha2” version of python.NET. This is marked as “alpha” – is this a bad idea?
I found your post on CG Society ( http://forums.cgsociety.org/archive/index.php/t-524687.html ) and I followed your link to Feihong Hsu’s instructions on building Python .NET ( Feihong Hsu: Installing Python.NET 2.0 Alpha 2 on Windows XP ) We are using Visual Studio 2005 (For reasons which are beyond my control) so I cant’ specify Framework Target through the Project Properties. (Hsu says to set the TARGET FRAMEWORK to .NET 2.0)
I’m downloading Visual Studio Express Edition 2008 to see if I can make it work through that. I’ll post the results ASAP.
In the mean time, can you see what i’m doing wrong?
(BTW- we’re running Maya2009 and i’m using a 32 bit machine, windows XP)
Cheers,
Neil