简体   繁体   中英

how can I install web.py in windows7?

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.

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

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

>>> 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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM