importing PYD files

Please support our Python advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Jan 2008
Posts: 4
Reputation: dh273 is an unknown quantity at this point 
Solved Threads: 0
dh273 dh273 is offline Offline
Newbie Poster

importing PYD files

 
0
  #1
Oct 30th, 2008
You'll have to excuse me, I'm a complete python newbie, but am trying to import a pyd file that I've been sent by a friend. He assures me the file works fine on his computer but when I run
  1. import myfile.pyd
, after having placed the pyd file in the c:\Python\DLLs folder and added the directory to the environment variable, I get the following error

"ImportError: DLL load failed: The specified module could not be found."

I've tried other PYD files from the same directory and they work, so I don't think it's a problem with the directory. Would it matter if my friend compiled this on a different version of Python?

Thanks
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 1,054
Reputation: jlm699 is a jewel in the rough jlm699 is a jewel in the rough jlm699 is a jewel in the rough jlm699 is a jewel in the rough 
Solved Threads: 265
Sponsor
jlm699's Avatar
jlm699 jlm699 is offline Offline
Knows where his Towel is

Re: importing PYD files

 
0
  #2
Oct 30th, 2008
Can you try just import myfile , without the .pyd?
1. Use Code Tags.
2. Homework? Show Effort.
3. Keep discussions on the forum: no PMs
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 4
Reputation: dh273 is an unknown quantity at this point 
Solved Threads: 0
dh273 dh273 is offline Offline
Newbie Poster

Re: importing PYD files

 
0
  #3
Oct 30th, 2008
I've tried that and I get the same error message. Any thoughts?
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 45
Reputation: tyincali is an unknown quantity at this point 
Solved Threads: 6
tyincali tyincali is offline Offline
Light Poster

Re: importing PYD files

 
0
  #4
Oct 30th, 2008
try this before the import

  1. import sys
  2. sys.path.append("c:\Python\DLLs")
I wish I had something cool to put here...
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 45
Reputation: tyincali is an unknown quantity at this point 
Solved Threads: 6
tyincali tyincali is offline Offline
Light Poster

Re: importing PYD files

 
0
  #5
Oct 30th, 2008
It could be an issue with the python versions, but that isn't usually the error you get when that is the case.
I wish I had something cool to put here...
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 4
Reputation: dh273 is an unknown quantity at this point 
Solved Threads: 0
dh273 dh273 is offline Offline
Newbie Poster

Re: importing PYD files

 
0
  #6
Oct 30th, 2008
Excellent - it's now working. Thanks very much for your help, guys
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 45
Reputation: tyincali is an unknown quantity at this point 
Solved Threads: 6
tyincali tyincali is offline Offline
Light Poster

Re: importing PYD files

 
0
  #7
Oct 30th, 2008
what was the solution?
I wish I had something cool to put here...
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the Python Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC