Python import web not working

后端 未结 7 1837
长发绾君心
长发绾君心 2020-12-29 08:15

So I\'m getting the following error when running a script that imports web.

$ python bin/app.py
Traceback (most recent call last):
File \"bin/ap         


        
相关标签:
7条回答
  • 2020-12-29 08:19

    For Ubuntu OS, install python web using below command:

    sudo apt-get install python-webpy
    
    0 讨论(0)
  • 2020-12-29 08:27

    Old question, but for people who reach this via web search, this is the command you're looking for, assuming an apt-based linux distribution like ubuntu or debian:

    $ sudo aptitude install python-webpy

    0 讨论(0)
  • 2020-12-29 08:29

    With pip: pip install web.py==0.40.dev0

    0 讨论(0)
  • 2020-12-29 08:35

    The problem is that you most likely used pip install lpthw.web to install however the lpthw book is using python 2.7 so pip2.7 would fix this:

    pip2.7 install lpthw.web

    0 讨论(0)
  • 2020-12-29 08:41

    The following is the command that you need to run

    $ easy_install web.py

    And according to the document for lpthw (which just uses a fork of web.py), you can run :

    $ pip install lpthw.web

    Then to run the application you will just need to do:

    $ python app.py

    0 讨论(0)
  • 2020-12-29 08:42

    You have to download source from http://webpy.org/static/web.py-0.36.tar.gz.

    The steps to install web is on http://webpy.org/install.

    Please follow the steps if got any error then add comments to this post or update the question.

    0 讨论(0)
提交回复
热议问题