[Pythonmac-SIG] Mac PyImport_ImportModule("modulename")

Bob Ippolito bob at redivi.com
Sat Dec 10 02:15:37 CET 2005

On Dec 9, 2005, at 4:41 PM, Zhi Peng wrote:

> In my c code, I have used myMod=PyImport_ImportModule("moduleName")  
> and run on Mac, but it just can not import the "moduleName" for  
> some unknown reason.
> I am sure I install the "moduleName" by "pythonw setup install".  
> And I can import "moduleName" from command lines such as
> >pythonw
> >import moduleName
> >
> It is fine. I wonder why PyImport_ImportModule can not import it,  
> while it can import module os by using
> PyImport_ImportModule("os")
> Any suggestion?

Are you sure it's the same version of Python, and the module is on  
sys.path?  Check sys.version and sys.path


More information about the Pythonmac-SIG mailing list