No module named _multiprocessing

   15901   9   0
User Avatar
Member
224 posts
Joined: 6月 2009
Offline
I am working on Windows 7, with Houdini 11, 64bit.

When I open the python shell (i.e. $HFS/python26/python2.6.exe ) and try and import the multiprocessing library, I get the following:

>>> import multiprocessing
Traceback (most recent call last):
File “<stdin>”, line 1, in <module>
File “C:\Program Files\Side Effects Software\Houdini 11.0.504\python26\lib\mul
tiprocessing\__init__.py”, line 83, in <module>
import _multiprocessing
ImportError: No module named _multiprocessing

But python26 has multiprocessing in it, and it works fine with the standard python. However, in the houdini version, the file $HFS\python26\dlls\_multiprocessing.pyd seems to be missing.

Any reason why this is happening?
Patrick
User Avatar
Member
1908 posts
Joined: 11月 2006
Offline
The Python that ships with Houdini does not contain all the modules that normally ship with Python due to size constraints and their necessity. This is the downside to using Windows as it doesn't have a full featured system version available to use it.

It may be possible to take the version installed when you run the regular Python installer and add it to the Houdini setup but Windows can be tricky.
Graham Thompson, Technical Artist @ Rockstar Games
User Avatar
Member
224 posts
Joined: 6月 2009
Offline
I installed houdini-11.0.658-win64.exe
So I tried installing python-2.6.amd64.msi

Then I copied the file dlls\_multiprocessing.pyd from the default python to the houdini python.

But no luck…
Now the error is:

>>> import multiprocessing
Traceback (most recent call last):
File “<stdin>”, line 1, in <module>
File “C:\Program Files\Side Effects Software\Houdini 11.0.658\python26\lib\mul
tiprocessing\__init__.py”, line 83, in <module>
import _multiprocessing
ImportError: DLL load failed: The specified module could not be found.
>>>
Patrick
User Avatar
Member
224 posts
Joined: 6月 2009
Offline
I have tried again with the 32 version.

I isntalled standard python26, then installed houdini 11 32bit.

Then I copied the file dlls\_multiprocessing.pyd from the default python to the houdini python26.

Still no luck…

>>> import multiprocessing
Traceback (most recent call last):
File “<stdin>”, line 1, in <module>
File “D:\programs\Side Effects Software\Houdini 11.0.658\python26\lib\multipro
cessing\__init__.py”, line 83, in <module>
import _multiprocessing
ImportError: DLL load failed: The specified module could not be found.
>>>

I can't really figure out why it is not finding this dll. It can find other dlls, like _ctypes.pyd, etc, so why not this one? Any suggestions?
Patrick
User Avatar
Member
1908 posts
Joined: 11月 2006
Offline
Unfortunately it can be quite tricky if it is even possible. In this case it might not be.

People have been able to install other things into Houdini on Windows but I think they are usually made possible by the people compiling the source code themselves using the same compiler that Houdini uses. Of course there is no guarantee this will work either.
Graham Thompson, Technical Artist @ Rockstar Games
User Avatar
Member
224 posts
Joined: 6月 2009
Offline
A different approach may be to try and get houdini to use the standard python install in windows (like in linux). Can this be done? Can python be compiled with the houdini compatible compiler for windows? and then force houdini to use that python?
Patrick
User Avatar
Member
1908 posts
Joined: 11月 2006
Offline
That's not possible unfortunately.
Graham Thompson, Technical Artist @ Rockstar Games
User Avatar
Member
105 posts
Joined: 7月 2005
Offline
Hi Patrick,

I have tried importing the multiprocessing module successfully within H11's python shell in both Linux (Fedora 14) and OS X 10.6.6. Both OS and Houdini installations are default and nothing needs to be added to the Python lib directories.

From google searches, it seems that the multiprocessing module has problems working in Windows within an interactive Python console.

Perhaps you can try using a Mac or Linux-based PC instead if it is feasible?

Cheers,
tk

Attachments:
importmultiprocessing_f14_h11_scrnshot.png (14.9 KB)

User Avatar
Member
55 posts
Joined: 9月 2010
Offline
Would be so nice if Houdini shipped with this dll.

A note on multiprocessing though, at least within Houdini: You shouldn't directly use multiprocessing from within Houdini. Multiprocessing tries to copy the environment that calls it when it starts to fork processes. Some mechanism in Houdini doesn't like this and Houdini will hang. The only way I have found to use this module is to have subprocess call an external .py file that uses multiprocessing.

Have fun!
User Avatar
Member
1 posts
Joined: 3月 2012
Offline
Hi
…i got phyton error Windows on 12.185 on win7 64Bit….
Any help?
  • Quick Links