Hi Mark, I'm guessing User Access Control is not disabled for me. I have an administrator account on Win 7 Professional. While installing stuff, very often at the last step of the install wizard, I get the install button with the chequered shield symbol, indicating admin credentials required. Since my account is an admin, I get a modal dialog asking whether I want to continue or not. This did NOT happen for the pywin32 installer mentioned below.
However since you made the suggestion I explicitly chose to run the installer as admin and it works fine now (I am able to import win32api, win32gui etc), even though I still get the same error at the finish stage of the install wizard mentioned earlier: ---------------------------------------------------------------------------------------------- Postinstall script finished Click the Finish button to exit the setup wizard close failed in file object destructor: sys.excepthook is missing lost sys.stderr ---------------------------------------------------------------------------------------------- Thanks for the tip. Best regards, Ferdi On Mon, Jun 18, 2012 at 9:42 AM, Mark Hammond <skippy.hamm...@gmail.com>wrote: > On 16/06/2012 2:20 AM, Ferdinand Sousa wrote: > >> Hi List, >> >> First off, it's good to be back after 3 years!! >> >> I was dusting off some old scripts I had written using pywin32. (Python >> 2.5 era I think). It uses the win32con and win32api modules. >> >> Now I'm trying to use the same scripts with Python 2.7 AMD64 version. >> >> I downloaded pywin32-217.win-amd64-py2.7.**exe from the sourceforge site >> and installed it. At the end, I see the following message: >> ------------------------------**------------------------------** >> ------------------------------**---- >> Postinstall script finished >> Click the Finish button to exit the setup wizard >> >> close failed in file object destructor: >> sys.excepthook is missing >> lost sys.stderr >> ------------------------------**------------------------------** >> ------------------------------**---- >> > > This seems to happen if User Access Control (UAC) is disabled - is it > disabled for you? > > Either way, try running "python scripts\pywin32_postinstall.py -install" > from the root of the install directory and things should finish registering > - that should fix the next error you see. > > > >> Then, I tried importing win32con and it works. But, when I tried >> importing win32api, win32gui I get the error message: >> >> ------------------------------**------------------------------** >> ------------------------------**---- >> Traceback (most recent call last): >> File "<pyshell#3>", line 1, in <module> >> import win32api, win32gui >> ImportError: DLL load failed: The specified module could not be found. >> ------------------------------**------------------------------** >> ------------------------------**---- >> >> So I uninstalled pywin32 and tried installing it from source. But alas, >> I again hit a roadblock: >> >> ------------------------------**------------------------------** >> ------------------------------**---- >> C:\Users\ferdinand\Downloads\**pywin32-217>c:\Python27\**python.exe >> setup.py >> install >> Building pywin32 2.7.217.0 >> Traceback (most recent call last): >> File "setup.py", line 1944, in <module> >> """ % dirs).split(), >> File "setup.py", line 603, in __init__ >> if os.path.isfile(os.path.join(**sdk_dir, "include", "activdbg.h")): >> File "c:\Python27\lib\ntpath.py", line 96, in join >> assert len(path) > 0 >> TypeError: object of type 'NoneType' has no len() >> > > This will probably be due to the setup script not finding the platform SDK. > > HTH, > > Mark > >> >> C:\Users\ferdinand\Downloads\**pywin32-217> >> ------------------------------**------------------------------** >> ------------------------------**---- >> >> Any pointers? >> >> Thanks in advance, >> Ferdi >> >> >> >> ______________________________**_________________ >> python-win32 mailing list >> python-win32@python.org >> http://mail.python.org/**mailman/listinfo/python-win32<http://mail.python.org/mailman/listinfo/python-win32> >> >> >
_______________________________________________ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32