Pywin IOError on Windows 7

Posted: Friday 3 May 2013

How to fix "IOError: [Errno 13] Permission denied: 'C:\\Program Files\\Python27\\lib\\site-packages\\win32com\\gen_py\\__init__.py'"?
From: https://simonsays.googlecode.com/svn-history/r6/wiki/InstallationGuide.wiki
IOError: [Errno 13] Permission denied: 'C:\\Python27\\lib\\site-packages\\win32com\\gen_py\\dicts.dat'
The easiest fix for this appears to be to open up the win32com directory for Users - Full Control. This will allow all the code to run as non-admin. 
So,
  • Navigate to C:\Program Files\Python27\Lib\site-packages\win32com
  • Right-click the gen_py folder
  • Click on "Properties" in the dropdown menu
  • Click on the "Security" tab that first pops up
  • Click on the "Advanced" button
  • Click on "Change permissions" from there
  • After highlighting the list option with the name starting with "Users", click on "Edit..."
  • On the window that pops up, click on the "Allow" checkbox next to "Full Control" (to tick it)

    and press the "OK" button

And that's it! The Pywin IOError will no longer appear.