[PyDev] win32com ImportError: DLL load failed [message #1730463] |
Mon, 25 April 2016 22:49  |
Eclipse User |
|
|
|
Hello,
I just installed win32com for Python and it's working well in IDLE, that is, I can import win32com without any problem. But in Eclipse, I always get this error message as follows.
import win32com.client as win32
File "C:\Python27\Lib\site-packages\win32com\__init__.py", line 5, in <module>
import win32api, sys, os
ImportError: DLL load failed: The specified module could not be found.
I tried to get rid of Python as an interpreter and then added it again which also added PYTHONPATH automatically. But it didn't work. The only way to get it work was to change the working directory before importing win32com module as follows. Isn't there any smarter way than this to resolve the problem?
import os
#os.chdir("C:\\Python27")
import win32com.client as win32
|
|
|
Re: [PyDev] win32com ImportError: DLL load failed [message #1730538 is a reply to message #1730463] |
Tue, 26 April 2016 10:43  |
Eclipse User |
|
|
|
On 04/25/2016 10:02 PM, Andrew Yang wrote:
> Hello,
>
> I just installed win32com for Python and it's working well in IDLE, that
> is, I can import win32com without any problem. But in Eclipse, I always
> get this error message as follows.
>
> import win32com.client as win32
> File "C:\Python27\Lib\site-packages\win32com\__init__.py", line 5, in
> <module>
> import win32api, sys, os
> ImportError: DLL load failed: The specified module could not be found.
>
> I tried to get rid of Python as an interpreter and then added it again
> which also added PYTHONPATH automatically. But it didn't work. The only
> way to get it work was to change the working directory before importing
> win32com module as follows. Isn't there any smarter way than this to
> resolve the problem?
>
> import os
> #os.chdir("C:\\Python27")
> import win32com.client as win32
Please understand that Python is not a language supported directly by
Eclipse in these forums. It's done by third party (the PyDev guy) and
you'll need to establish support a different way than through this
forum. Take a look around http://www.pydev.org and also consider
stackoverflow.com with the PyDev and Python tags.
Cheers and best of luck to you.
|
|
|
Powered by
FUDForum. Page generated in 0.07333 seconds