推荐学习书目
› Learn Python the Hard Way
Python Sites
› PyPI - Python Package Index
› http://diveintopython.org/toc/index.html
› Pocoo
值得关注的项目
› PyPy
› Celery
› Jinja2
› Read the Docs
› gevent
› pyenv
› virtualenv
› Stackless Python
› Beautiful Soup
› 结巴中文分词
› Green Unicorn
› Sentry
› Shovel
› Pyflakes
› pytest
Python 编程
› pep8 Checker
Styles
› PEP 8
› Google Python Style Guide
› Code Style from The Hitchhiker's Guide
yibin001
V2EX  ›  Python

mac下apache mod_wsgi+webpy配置

  •  
  •   yibin001 · Feb 12, 2012 · 5803 views
    This topic created in 5342 days ago, the information mentioned may be changed or developed.
    httpd.conf
    LoadModule wsgi_module libexec/apache2/mod_wsgi.so
    已经加载了mod_wsgi,已重启apache
    9000端口对一webpy站点开放
    但通过localhost:9000时访问时,500错误,通过看apache日志,得知是:
    [Sun Feb 12 09:00:21 2012] [error] [client ::1] import web
    [Sun Feb 12 09:00:21 2012] [error] [client ::1] ImportError: No module named web

    但是在python命令行里import web却是正常的,这是为神马?
    2 replies  •  2015-09-14 17:26:51 +08:00
    yibin001
        1
    yibin001  
    OP
       Feb 12, 2012
    好吧,我错了,
    webpy官网FAQ里就有
    If you get an "ImportError: No module named web" in your apache error.log file, you could try setting the absolute path in code.py before importing web:
    depr
        2
    depr  
       Sep 14, 2015
    想问下,在 mac 上安装 mod_wsgi 的方法是什么呢?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   5496 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 02:49 · PVG 10:49 · LAX 19:49 · JFK 22:49
    ♥ Do have faith in what you're doing.