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
phaibin
V2EX  ›  Python

uwsgi不能在virtualenv里面运行

  •  
  •   phaibin ·
    phaibin · 2012-08-29 14:30:38 +08:00 · 3962 次点击
    这是一个创建于 4229 天前的主题,其中的信息可能已经有所发展或是发生改变。
    我先启用了virtualenv环境,然后在virtualenv环境下面用pip安装uwsgi,然后在virtualenv环境下面启动uwsgi。服务是启动起来了,但是打开浏览器一片空白,uwsgi也没有日志输出。

    然后试着脱离virtualenv的环境来安装uwsgi和启动uwsgi,居然没有问题。因为在uwsgi的配置文件里面指定了home参数为virtualenv的目录,所以实际上python依然用的是virtualenv里面的环境。

    那是不是运行uwsgi就不需要virtualenv的环境了呢?
    3 条回复    1970-01-01 08:00:00 +08:00
    mitnk
        1
    mitnk  
       2012-08-29 15:18:12 +08:00
    uwsgi 不属于 python/virtualenv 阵营。
    kollinchu
        2
    kollinchu  
       2012-08-29 16:13:17 +08:00
    在uwsgi配置中是可以指定virtualenv的
    phaibin
        3
    phaibin  
    OP
       2012-08-29 16:38:19 +08:00
    刚刚我发现了一件更诡异的事情,并不是在virtualenv里面的uwsgi不能运行。
    我先在virtualenv中装,再在外面环境中装,就是外面环境中的uwsgi可以用;先在外面环境中装,再在virtualenv中装,就是virtualenv中的可以用。
    也就是说后面装的那个才可以用,而先装的就不可以用。
    疯掉了~
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3991 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 10:20 · PVG 18:20 · LAX 03:20 · JFK 06:20
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.