Error importing .pyd python extension

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Toby

    #1

    Error importing .pyd python extension

    Hi, I've managed to get my hands on the ms 2003 toolkit, and have
    successfully (i think) created a .pyd file in win xp (setup.py is
    provided intersystems cache):

    --------------------------------------------------------------------
    C:\CacheSys\Dev \python>setup.p y install
    enter directory where you installed Cache'c:\CacheS ys
    libdir=c:\Cache Sys\dev\cpp\lib
    include dir=c:\CacheSys \dev\cpp\includ e
    running install
    running build
    running build_py
    running build_ext
    running install_lib
    creating C:\Program Files\Python243 \Lib\site-packages\inters ys
    copying build\lib.win32-2.4\intersys\py thonbind.py -C:\Program
    Files\Python243
    \Lib\site-packages\inters ys
    copying build\lib.win32-2.4\intersys\py thonbind1.pyd -C:\Program
    Files\Python2
    43\Lib\site-packages\inters ys
    copying build\lib.win32-2.4\intersys\__ init__.py -C:\Program
    Files\Python243 \L
    ib\site-packages\inters ys
    byte-compiling C:\Program
    Files\Python243 \Lib\site-packages\inters ys\pythonbind.
    py to pythonbind.pyc
    byte-compiling C:\Program
    Files\Python243 \Lib\site-packages\inters ys\__init__.py
    to __init__.pyc

    C:\CacheSys\Dev \python>cd \program
    files\python243 \Lib\site-packages\inters ys\

    C:\Program Files\Python243 \Lib\site-packages\inters ys>dir
    Volume in drive C is SYSTEM
    Volume Serial Number is 3835-49DE

    Directory of C:\Program Files\Python243 \Lib\site-packages\inters ys

    31/10/2006 10:47 AM <DIR .
    31/10/2006 10:47 AM <DIR ..
    19/10/2006 05:50 PM 1,598 pythonbind.py
    31/10/2006 10:47 AM 1,961 pythonbind.pyc
    31/10/2006 09:44 AM 69,632 pythonbind1.pyd
    17/07/2006 05:34 PM 2 __init__.py
    31/10/2006 10:47 AM 145 __init__.pyc
    5 File(s) 73,338 bytes
    2 Dir(s) 16,709,017,600 bytes free
    --------------------------------------------------------------------

    However, when I try to import pythonbind1.pyd I get the following
    error:

    Traceback (most recent call last):
    File
    "C:\PROGRA~1\AC TIVE~1.5\lib\su pport\dbgp\pyth onlib\dbgp\clie nt.py",
    line 1843, in runMain
    self.dbg.runfil e(debug_args[0], debug_args)
    File
    "C:\PROGRA~1\AC TIVE~1.5\lib\su pport\dbgp\pyth onlib\dbgp\clie nt.py",
    line 1538, in runfile
    h_execfile(file , args, module=main, tracer=self)
    File
    "C:\PROGRA~1\AC TIVE~1.5\lib\su pport\dbgp\pyth onlib\dbgp\clie nt.py",
    line 596, in __init__
    execfile(file, globals, locals)
    File "C:\Program
    Files\Python243 \Lib\site-packages\inters ys\tobytest.py" , line 1, in
    __main__
    import pythonbind1.pyd
    ImportError: DLL load failed: The specified module could not be found.


    Any suggestions?

  • Toby

    #2
    Re: Error importing .pyd python extension

    P.S. I have run 'depends', and all the dll's are there, the only error
    its throwing up is:

    "Warning: At least one module has an unresolved import due to a missing
    export function in a delay-load dependent module."

    The offending file is mpr.dll in c:\windows\syst em32\

    Any ideas?

    Toby

    Toby wrote:
    Hi, I've managed to get my hands on the ms 2003 toolkit, and have
    successfully (i think) created a .pyd file in win xp (setup.py is
    provided intersystems cache):
    >
    --------------------------------------------------------------------
    C:\CacheSys\Dev \python>setup.p y install
    enter directory where you installed Cache'c:\CacheS ys
    libdir=c:\Cache Sys\dev\cpp\lib
    include dir=c:\CacheSys \dev\cpp\includ e
    running install
    running build
    running build_py
    running build_ext
    running install_lib
    creating C:\Program Files\Python243 \Lib\site-packages\inters ys
    copying build\lib.win32-2.4\intersys\py thonbind.py -C:\Program
    Files\Python243
    \Lib\site-packages\inters ys
    copying build\lib.win32-2.4\intersys\py thonbind1.pyd -C:\Program
    Files\Python2
    43\Lib\site-packages\inters ys
    copying build\lib.win32-2.4\intersys\__ init__.py -C:\Program
    Files\Python243 \L
    ib\site-packages\inters ys
    byte-compiling C:\Program
    Files\Python243 \Lib\site-packages\inters ys\pythonbind.
    py to pythonbind.pyc
    byte-compiling C:\Program
    Files\Python243 \Lib\site-packages\inters ys\__init__.py
    to __init__.pyc
    >
    C:\CacheSys\Dev \python>cd \program
    files\python243 \Lib\site-packages\inters ys\
    >
    C:\Program Files\Python243 \Lib\site-packages\inters ys>dir
    Volume in drive C is SYSTEM
    Volume Serial Number is 3835-49DE
    >
    Directory of C:\Program Files\Python243 \Lib\site-packages\inters ys
    >
    31/10/2006 10:47 AM <DIR .
    31/10/2006 10:47 AM <DIR ..
    19/10/2006 05:50 PM 1,598 pythonbind.py
    31/10/2006 10:47 AM 1,961 pythonbind.pyc
    31/10/2006 09:44 AM 69,632 pythonbind1.pyd
    17/07/2006 05:34 PM 2 __init__.py
    31/10/2006 10:47 AM 145 __init__.pyc
    5 File(s) 73,338 bytes
    2 Dir(s) 16,709,017,600 bytes free
    --------------------------------------------------------------------
    >
    However, when I try to import pythonbind1.pyd I get the following
    error:
    >
    Traceback (most recent call last):
    File
    "C:\PROGRA~1\AC TIVE~1.5\lib\su pport\dbgp\pyth onlib\dbgp\clie nt.py",
    line 1843, in runMain
    self.dbg.runfil e(debug_args[0], debug_args)
    File
    "C:\PROGRA~1\AC TIVE~1.5\lib\su pport\dbgp\pyth onlib\dbgp\clie nt.py",
    line 1538, in runfile
    h_execfile(file , args, module=main, tracer=self)
    File
    "C:\PROGRA~1\AC TIVE~1.5\lib\su pport\dbgp\pyth onlib\dbgp\clie nt.py",
    line 596, in __init__
    execfile(file, globals, locals)
    File "C:\Program
    Files\Python243 \Lib\site-packages\inters ys\tobytest.py" , line 1, in
    __main__
    import pythonbind1.pyd
    ImportError: DLL load failed: The specified module could not be found.
    >
    >
    Any suggestions?

    Comment

    Working...