Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

uWSGI config:

<uwsgi>
    <module>app_wsgi:app</module>
    <pythonpath>./src</pythonpath>
    <socket>/tmp/uwsgi.sock</socket>
    <pidfile>/tmp/uwsgi.pid</pidfile>
    <daemonize>uwsgi.log</daemonize>
</uwsgi>

buildout.cfg

[buildout]
parts = eggs uwsgi
versions = versions
include-site-packages = false

[eggs]
recipe: zc.recipe.egg:eggs
eggs =
    flask

[versions]
flask = 0.9

[uwsgi]
recipe: buildout.recipe.uwsgi
version = 1.4.3

Exception:

*** Operational MODE: single process ***
added ./src/ to pythonpath.
Traceback (most recent call last):
  File "./src/app_wsgi.py", line 1, in <module>
    from app import create_app
  File "./src/app.py", line 1, in <module>
    from flask import Flask, request
ImportError: No module named flask
unable to load app 0 (mountpoint='') (callable not found or import error)

It's clear how to fix the issue in case of virtualenv, but with buildout everything is much more complicated. Manually changing pythonpath is not a solution. Any ideas?

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.