How to install web2py in virtualenv on windows 7?

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

From what I read, this should be a process:

  • install virtualenv (done)
  • create virtualenv (done)
  • install pywin32 in this env (I read that it must be installed before installing Web2py)
  • install web2py in env

First of all: is this correct? If yes, then...

I tried installing pywin32 through

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

Everything went well. Then I checked the virtual environment sites for the pywin32 folder, and it was there, but I was not able to import it into python (`` '' ther no module pywin32 '' '). The environment was definitely active (I checked twice).

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

'' 'failed to complete work with object destructor:

sys.excepthook is missing

lost sys.stderr '' '

I downloaded the file again (it may be damaged), tried to install it again, but got the same result.

Can someone help me or point out a step-by-step installation of pywin32 (if necessary) and then web2py for Windows 7? I would really appreciate it.

+4
source share
2 answers

In my experience, the easy_install pywin32-218.win32-py2.7.exe under active virtualenv works fine.

To test the installation of pywin32, with python you can try:

 from win32api import GetVersionEx print GetVersionEx() 

Getting something similar (Windows OS version, minor version, build number, platform identifier, additional information):

 (6, 1, 7601, 2, 'Service Pack 1') 

You cannot import the pywin32 module because it does not exist.

After installing pywin32, you can install web2py under the active virtualenv (I tested it before opening the admin interface, without warranty :-):

  • download the source code http://www.web2py.com/init/default/download
  • unzip it ...\ virtualenvdir \Lib\site-packages\ (getting: ...\ virtualenvdir \Lib\site-packages\web2py\... )
  • cd to ...\ virtualenvdir \Lib\site-packages\web2py
  • start web2py server: python web2py.py

At the moment, I could not install web2py using pip . First of all, it grabs the old version of web2py from PyPy. When I tried to use this version of web2py, I received the error message ImportError: No module named ... Same thing with pip on a copy of the web2py source file.

0
source

All Articles