Install web2py in virtualenv

791 views
Skip to first unread message

Denis Rykov

unread,
Apr 19, 2013, 8:56:33 AM4/19/13
to web...@googlegroups.com
Trying to install web2py in virtualenv on Ubuntu but when I run "w2p_run" I get an error "RuntimeError: Cannot determine web2py version".

Christopher Steel

unread,
Apr 20, 2013, 1:02:50 PM4/20/13
to web...@googlegroups.com
Confirmed:

from virtualenv ran "pip install web2py"

w2p_run gives following output::

WARNING:root:Unable to import plural rules: No module named plural_rules
Traceback (most recent call last):
  File "/Users/cjs/.virtualenvs/ansible-env/bin/w2p_run", line 17, in <module>
    import gluon.widget
  File "/Users/cjs/.virtualenvs/ansible-env/lib/python2.6/site-packages/gluon/widget.py", line 26, in <module>
    import main
  File "/Users/cjs/.virtualenvs/ansible-env/lib/python2.6/site-packages/gluon/main.py", line 110, in <module>
    raise RuntimeError, "Cannot determine web2py version"
RuntimeError: Cannot determine web2py version

Massimo Di Pierro

unread,
Apr 20, 2013, 11:13:00 PM4/20/13
to web...@googlegroups.com
We need somebody to take charge and help with this.

Massimo

Vinicius Assef

unread,
Apr 23, 2013, 5:49:59 AM4/23/13
to web2py
Massimo, the problem is when main.py tries to read VERSION info.

I just made a test and I could not see VERSION listed in in
site-packages/web2py-2.1.1-py2.7.egg-info/installed-files.txt

Besides that, settings.py tries to get web2py_path environment
variable, but it's not set in a default, just created, virtualenv.

Another point is the available version in pypi: 2.1.1.

As I don't have enough knowledge as how to package web2py to pypi,
this is what I could identifiy.
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+un...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Christopher Steel

unread,
Nov 27, 2013, 9:38:15 PM11/27/13
to web...@googlegroups.com

w2p_clone works fine and clones web2py to your virtual environment where you can launch it by doing the standard cd web2py then python web2py.py

The original pypi version installs a slimmed down version of gluon only. I would change it but perhaps someone is using it.

To complicate matters (or simplify them depending on how you look at it!) as Web2py does not require an installer pypi does not seem to have any easy way of not installing something.

I created the w2p_clone command as a work around that gives those who want the latest full version of Web2py an easy way to get it.

Here is how to get the latest version of Web2py using the pypi package:

pip install web2py

then 

w2p_clone

This gets you the latest version of web2py in your virtualenv's directory. You can start this the standard way you start web2py, in this case something like:

python ~/.virtualenvs/myvirtualenv/web2py/web2py.py



On Friday, April 19, 2013 8:56:33 AM UTC-4, Denis Rykov wrote:

Massimo Di Pierro

unread,
Dec 1, 2013, 9:09:47 PM12/1/13
to web...@googlegroups.com
there is no w2p_clone any more. It was removed in a recent upgrade because it was clear anybody was maintaining it. Please join us on web2py-developers to make a case for it.
Reply all
Reply to author
Forward
0 new messages