V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
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 · 2012-02-12 09:44:27 +08:00 · 4505 次点击
    这是一个创建于 4463 天前的主题,其中的信息可能已经有所发展或是发生改变。
    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 条回复    2015-09-14 17:26:51 +08:00
    yibin001
        1
    yibin001  
    OP
       2012-02-12 09:52:38 +08:00
    好吧,我错了,
    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  
       2015-09-14 17:26:51 +08:00
    想问下,在 mac 上安装 mod_wsgi 的方法是什么呢?
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2094 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 23ms · UTC 10:45 · PVG 18:45 · LAX 03:45 · JFK 06:45
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.