0

I feel really dumb right now because I have done this a thousand times with other modules... The problem I'm having is when I import win32api from idle, it works. When I save my .py file into my dropbox folder and run it from there, the import returns this error:

Traceback (most recent call last):
File "C:\Users\Username\Dropbox\Python\Clacker.py", line 6, in <module>
import win32api, win32con
ImportError: DLL load failed: The specified module could not be found.

Any ideas? I'm guessing it's something super simple that I overlooked (I have been on a PHP binge for a while so my python is rusty).

linusg
  • 6,289
  • 4
  • 28
  • 78
RattleyCooper
  • 4,997
  • 5
  • 27
  • 43
  • Are you executing the script on the same machine? As in, when you save it to drop box are you trying to execute it from somewhere else that's running it locally and doesn't have the module available? – Dan Field Apr 01 '16 at 18:45
  • @DanField, nope, this is all run locally on the same machine I installed the module on. I have confirmed the code I'm running works, just when I do the import from the python shell in idle. When I import from the .py file, that is when I get the error. – RattleyCooper Apr 01 '16 at 18:46
  • 2
    read this http://stackoverflow.com/a/7279374/4941927 and take this https://sourceforge.net/projects/pywin32/files/pywin32/ – Milor123 Apr 01 '16 at 18:54
  • @Milor123, that did it! If you write that into an answer, I will accept it for you. Thanks! – RattleyCooper Apr 01 '16 at 18:58
  • 1
    @DuckPuncher Thanks dude, in some occasions I've putted similar comment as answers then the people put me vote down :S – Milor123 Apr 01 '16 at 19:04

0 Answers0