Error importing .pyd python extension

T

Toby

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.py install
enter directory where you installed Cache'c:\CacheSys
libdir=c:\CacheSys\dev\cpp\lib
include dir=c:\CacheSys\dev\cpp\include
running install
running build
running build_py
running build_ext
running install_lib
creating C:\Program Files\Python243\Lib\site-packages\intersys
copying build\lib.win32-2.4\intersys\pythonbind.py -> C:\Program
Files\Python243
\Lib\site-packages\intersys
copying build\lib.win32-2.4\intersys\pythonbind1.pyd -> C:\Program
Files\Python2
43\Lib\site-packages\intersys
copying build\lib.win32-2.4\intersys\__init__.py -> C:\Program
Files\Python243\L
ib\site-packages\intersys
byte-compiling C:\Program
Files\Python243\Lib\site-packages\intersys\pythonbind.
py to pythonbind.pyc
byte-compiling C:\Program
Files\Python243\Lib\site-packages\intersys\__init__.py
to __init__.pyc

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

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

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

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\ACTIVE~1.5\lib\support\dbgp\pythonlib\dbgp\client.py",
line 1843, in runMain
self.dbg.runfile(debug_args[0], debug_args)
File
"C:\PROGRA~1\ACTIVE~1.5\lib\support\dbgp\pythonlib\dbgp\client.py",
line 1538, in runfile
h_execfile(file, args, module=main, tracer=self)
File
"C:\PROGRA~1\ACTIVE~1.5\lib\support\dbgp\pythonlib\dbgp\client.py",
line 596, in __init__
execfile(file, globals, locals)
File "C:\Program
Files\Python243\Lib\site-packages\intersys\tobytest.py", line 1, in
__main__
import pythonbind1.pyd
ImportError: DLL load failed: The specified module could not be found.


Any suggestions?
 
T

Toby

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\system32\

Any ideas?

Toby
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.py install
enter directory where you installed Cache'c:\CacheSys
libdir=c:\CacheSys\dev\cpp\lib
include dir=c:\CacheSys\dev\cpp\include
running install
running build
running build_py
running build_ext
running install_lib
creating C:\Program Files\Python243\Lib\site-packages\intersys
copying build\lib.win32-2.4\intersys\pythonbind.py -> C:\Program
Files\Python243
\Lib\site-packages\intersys
copying build\lib.win32-2.4\intersys\pythonbind1.pyd -> C:\Program
Files\Python2
43\Lib\site-packages\intersys
copying build\lib.win32-2.4\intersys\__init__.py -> C:\Program
Files\Python243\L
ib\site-packages\intersys
byte-compiling C:\Program
Files\Python243\Lib\site-packages\intersys\pythonbind.
py to pythonbind.pyc
byte-compiling C:\Program
Files\Python243\Lib\site-packages\intersys\__init__.py
to __init__.pyc

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

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

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

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\ACTIVE~1.5\lib\support\dbgp\pythonlib\dbgp\client.py",
line 1843, in runMain
self.dbg.runfile(debug_args[0], debug_args)
File
"C:\PROGRA~1\ACTIVE~1.5\lib\support\dbgp\pythonlib\dbgp\client.py",
line 1538, in runfile
h_execfile(file, args, module=main, tracer=self)
File
"C:\PROGRA~1\ACTIVE~1.5\lib\support\dbgp\pythonlib\dbgp\client.py",
line 596, in __init__
execfile(file, globals, locals)
File "C:\Program
Files\Python243\Lib\site-packages\intersys\tobytest.py", line 1, in
__main__
import pythonbind1.pyd
ImportError: DLL load failed: The specified module could not be found.


Any suggestions?
 
D

Dennis Lee Bieber

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

Traceback (most recent call last):
File
"C:\PROGRA~1\ACTIVE~1.5\lib\support\dbgp\pythonlib\dbgp\client.py",
line 1843, in runMain
self.dbg.runfile(debug_args[0], debug_args)
File
"C:\PROGRA~1\ACTIVE~1.5\lib\support\dbgp\pythonlib\dbgp\client.py",
line 1538, in runfile
h_execfile(file, args, module=main, tracer=self)
File
"C:\PROGRA~1\ACTIVE~1.5\lib\support\dbgp\pythonlib\dbgp\client.py",
line 596, in __init__
execfile(file, globals, locals)
File "C:\Program
Files\Python243\Lib\site-packages\intersys\tobytest.py", line 1, in
__main__
import pythonbind1.pyd

If that is the way you specified the import statement, then the
syntax is wrong.

As I interpret that line, it specifies to import the module named
pyd from the package named pythonbind1

Just try using

import pythonbind1


(and maybe try that from a command shell, not from an IDE)
--
Wulfraed Dennis Lee Bieber KD6MOG
(e-mail address removed) (e-mail address removed)
HTTP://wlfraed.home.netcom.com/
(Bestiaria Support Staff: (e-mail address removed))
HTTP://www.bestiaria.com/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top