Search code examples
pythonwindows-7virtualenvweb2pypywin32

How do I install web2py in a virtualenv in Windows 7?


I'm new to Python and I'm trying to install web2py in a virtualenv. I'm running a 32 bit python 2.7.3 installation on a 64 bit Windows 7.

From what I read, this should be the process:

  • install virtualenv (done)
  • create the virtualenv (done)
  • install pywin32 in that env (I've read it needs to be installed before the web2py installation)
  • install web2py in that env

First and foremost: is that right? If so, then...

I tried installing pywin32 through

'''easy_install pywin32-218.win32-py2.7.exe'''

It went fine. Then, I checked the virtual environment's site-packages for a pywin32 folder and it was there, but I couldn't import it into python ('''ther's no module pywin32'''). The environment was definitely active (I double-checked).

As a test, without using virtualenv, I double-click-installed the pywin32 binary (downloaded the 32 bit version for python 2.7 -- pywin32-218.win32-py2.7.exe) but got an error at the end:

'''close failed in file object destructor:

sys.excepthook is missing

lost sys.stderr'''

I downloaded the file again (could be corrupted), tried installing it again but got the same result.

Could anybody guide me or point me to a step-by-step install of pywin32 (if necessary) and then web2py for windows 7? I'd really appreciate it.


Solution

  • its a bug: http://sourceforge.net/tracker/?func=detail&aid=3402824&group_id=78018&atid=551954, workaround here : http://pywin32.hg.sourceforge.net/hgweb/pywin32/pywin32/rev/a64d8ac23e61 similar to this: Error installing and running pywin32 2.7