0

I downloaded web.py from this address:http://webpy.org/static/web.py-0.37.tar.gz and then extracted and copied the file to python address in my pc and ran setup.py. But still when I write "import web" in python(2.7), I get this error "No module named web". How can I install web.py correctly? I apologize for my bad English.

user2963623
  • 2,207
  • 1
  • 12
  • 25
user3789719
  • 104
  • 1
  • 10

2 Answers2

0
easy_install web.py

or

pip install web.py

or download *.tar.gz, unpack, and run command from the directory:

python.exe setup.py install
pancakes
  • 632
  • 4
  • 7
0

any time you cannot find a module in Python, you should start by checking the path Python searches for modules, i.e.

>>> import sys
>>> print "\n".join(sys.path)

/usr/bin
/usr/local/lib/python2.7/dist-packages/web.py-0.37-py2.7.egg
/usr/lib/python2.7
/usr/lib/python2.7/plat-linux2
/usr/lib/python2.7/lib-tk
/usr/lib/python2.7/lib-old
/usr/lib/python2.7/lib-dynload
/usr/local/lib/python2.7/dist-packages
/usr/lib/python2.7/dist-packages
/usr/lib/python2.7/dist-packages/PIL
/usr/lib/python2.7/dist-packages/gst-0.10
/usr/lib/python2.7/dist-packages/gtk-2.0
/usr/lib/pymodules/python2.7
/usr/lib/python2.7/dist-packages/ubuntu-sso-client
/usr/lib/python2.7/dist-packages/ubuntuone-client
/usr/lib/python2.7/dist-packages/ubuntuone-control-panel
/usr/lib/python2.7/dist-packages/ubuntuone-couch
/usr/lib/python2.7/dist-packages/ubuntuone-installer
/usr/lib/python2.7/dist-packages/ubuntuone-storage-protocol
bjarneh
  • 459
  • 3
  • 10