0

I installed on my XP machine the python version - 3.4.0

and now I want to install the web.py module the installation is failed on print "var", var

I guess is because the missing "(" , ")"

but how to fix that?

C:\Python34\Scripts>pip install web.py
 Downloading/unpacking web.py
 Running setup.py     (path:D:\DOCUME~1\uba\LOCALS~1\Temp\pip_build_uba\web.p
y\setup.py) egg_info for package web.py
   Traceback (most recent call last):
     File "<string>", line 17, in <module>
    File   "D:\DOCUME~1\ubarih\LOCALS~1\Temp\pip_build_uba\web.py\setup.py",
  line 6, in <module>
        from web import __version__
     File        "D:\DOCUME~1\uba\LOCALS~1\Temp\pip_build_uba\web.py\web\__init_
   _.py", line 14, in <module>
      import utils, db, net, wsgi, http, webapi, httpserver, debugerror
      File "C:\Python34\lib\site-packages\db\__init__.py", line 69
          print "var", var
                 ^
     SyntaxError: invalid syntax
     Complete output from command python setup.py egg_info:
       Traceback (most recent call last):

       File "<string>", line 17, in <module>

     File       "D:\DOCUME~1\uba\LOCALS~1\Temp\pip_build_uba\web.py\setup.py",    line
  6, in <module>

   from web import __version__

 File     "D:\DOCUME~1\ubarih\LOCALS~1\Temp\pip_build_uba\web.py\web\__init__.py
", line 14, in <module>

     import utils, db, net, wsgi, http, webapi, httpserver, debugerror

   File "C:\Python34\lib\site-packages\db\__init__.py", line 69

   print "var", var

          ^

  SyntaxError: invalid syntax

----------------------------------------
 Cleaning up...
maihabunash
  • 1,632
  • 9
  • 34
  • 60

1 Answers1

3

You installed Python 3.4 on your machine, but web.py does not support Python3.X.

If you look at the source, you see that there is a branch in the git, but the migration seemed to be incomplete. (https://github.com/webpy/webpy/tree/python3/web).

There was also a discussion about the migration (https://groups.google.com/forum/#!topic/webpy/NvDqKEEEMEI).

Install the development branch

You can try this branch by downloading the source from github (https://github.com/webpy/webpy/archive/python3.zip). After you downloaded the file, extract it and run the setup-script

setup.py install 

from a python command prompt (assuming you are on Windows).

But there is no guarantee that this version will work as expected.

As an (easier?) alternative:

If you want to use web.py, try to install python 2.7.x (https://www.python.org/downloads/release/python-2710/) and install web.py via pip afterwards.

Community
  • 1
  • 1
chris-sc
  • 1,698
  • 11
  • 21
  • so if this is the case what the web.py module that fit for version 3.X ? ( or maybe the web.py for 3.x is with diff name ? ) – maihabunash Aug 11 '15 at 07:30
  • there is no released web.py version for 3.X. If you want to try the development version, you need to manually download the source and install it for your python 3 environment. The easier way might be to use python 2.7.x if you need to use web.py. – chris-sc Aug 11 '15 at 07:33
  • ok , so it is possible to install also the python version 2.X in spite I have already the 3.X ?? – maihabunash Aug 11 '15 at 07:47
  • Yes. Have a look at https://stackoverflow.com/questions/3809314/how-to-install-both-python-2-x-and-python-3-x-in-windows-7 – chris-sc Aug 11 '15 at 07:50