magneto Posted March 19, 2012 Share Posted March 19, 2012 I am having issues installing this to Houdini. I download the python 2.6 version: http://sourceforge.net/projects/pywin32/files/pywin32/Build%20217/ After install it on Python 2.6, I copied the folders under site-packages into C:\Program Files\Side Effects Software\Houdini 12.0.558\python26\lib but when I try to import any module from that, I get a "no module named" error. Am I missing something? Quote Link to comment Share on other sites More sharing options...
Guest mantragora Posted March 19, 2012 Share Posted March 19, 2012 Don't copy it to install folder. Try you "$HOME\scripts\python" folder instead. Or you can also try to import it from your python directory like in this WX library example link. 1 Quote Link to comment Share on other sites More sharing options...
magneto Posted March 19, 2012 Author Share Posted March 19, 2012 Thanks, I just copied into $HOME\scripts\python and restarted Houdini but same result. I will read the link you posted tomorrow, because I am out of juice Quote Link to comment Share on other sites More sharing options...
Guest mantragora Posted March 19, 2012 Share Posted March 19, 2012 Are you sure it has to be win32 version ? If your Houdini is 64-bit than you got also 64-bit version of python and library will not work. There are also other reasons why it may not work. 1 Quote Link to comment Share on other sites More sharing options...
magneto Posted March 19, 2012 Author Share Posted March 19, 2012 Sorry I mentioned pywin32, but I think it's the name of the library. Otherwise I got the 64 version of it from the link I posted. But it still doesn't find it. This whole copy pasting modules is very annoying, same thing with Maya. I was running similar issues all the time. Would be good if there is a robust way to do these. Quote Link to comment Share on other sites More sharing options...
Guest mantragora Posted March 19, 2012 Share Posted March 19, 2012 This link from my first post shows way to import without copying. First six lines of it. There is problem with python on Windows. For example to make sure that "numpy" works you may have to compile library yourself. The same may be here. 1 Quote Link to comment Share on other sites More sharing options...
magneto Posted March 19, 2012 Author Share Posted March 19, 2012 Thanks I tried the stuff in your link but not sure what to put here: wx_path = "/usr/lib/python2.6/site-packages/HERE" import sys if wx_path not in sys.path: sys.path.append(wx_path) so I just put win32, which is a folder in pywin32, but after that I couldn't import anything. This is really strange. Quote Link to comment Share on other sites More sharing options...
Guest mantragora Posted March 19, 2012 Share Posted March 19, 2012 Just tried it and it works. pywin_path = "C:\Python26\Lib\site-packages\pythonwin" import sys if pywin_path not in sys.path: sys.path.append(pywin_path) if you don't know what to put "HERE" you can always check in standard shell where module is placed import pywin help(pywin) 1 Quote Link to comment Share on other sites More sharing options...
magneto Posted March 19, 2012 Author Share Posted March 19, 2012 Thanks mantragora, just tried your code, it worked. How did you find it was supposed to be pythonwin for pywin32? Quote Link to comment Share on other sites More sharing options...
Guest mantragora Posted March 19, 2012 Share Posted March 19, 2012 (edited) if you don't know what to put "HERE" you can always check in standard shell where module is placed import pywin help(pywin) Just like I said here. If you execute this code you get directory where "__init__.py" exists for this module. Just run CommandLine in Python mode or use one that comes with Python installation and run this code there. >>> import pywin >>> help(pywin) Help on package pywin: NAME pywin FILE c:\python26\lib\site-packages\pythonwin\pywin\__init__.py """ and the same for wx library ---------------------- ------------""" >>> import wx >>> help(wx) Help on package wx: NAME wx FILE c:\python26\lib\site-packages\wx-2.8-msw-unicode\wx\__init__.py This file is needed for directory to become python module. Check this info link. Edited March 19, 2012 by mantragora 1 Quote Link to comment Share on other sites More sharing options...
magneto Posted March 19, 2012 Author Share Posted March 19, 2012 Thanks man, now it all makes sense. Although I went ahead now and tried to import win32clipboard and I get the same error. win32clipboard is an existing module in pywin32: http://docs.activestate.com/activepython/2.4/pywin32/win32clipboard.html pywin_path = "C:\Python26\Lib\site-packages\pythonwin" import sys if pywin_path not in sys.path: sys.path.append(pywin_path) import pywin help(pywin) import win32clipboard Quote Link to comment Share on other sites More sharing options...
Guest mantragora Posted March 19, 2012 Share Posted March 19, 2012 Sorry, can't help with that. I thought that if I build library from source it will work, but it's not. It looks that hython and win32clipboard don't like each other. Quote Link to comment Share on other sites More sharing options...
magneto Posted March 19, 2012 Author Share Posted March 19, 2012 Thanks, it's good to know that I am not the only one getting this, so I am on the right track at least Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.