Yousuf Jawwad
Yousuf Jawwad

Reputation: 3097

trouble setting pythonpath with uwsgi

i am trying to run the uwsgi deamon. I am on amazon Linux with EPEL. For installation, I have done

sudo yum install uwsgi uwsgi-plugin-python

and this is my uwsgi ini

[uwsgi]

plugins         = python
socket          = /tmp/project.sock
#socket          = :9050
chmod-socket    = 666
uid             = nginx
gid             = nginx
master          = true
enable-threads  = true
processes       = 2

home            = /srv/project-live
virtualenv      = /srv/project-live
chdir           = /srv/project-live
pythonpath      = /srv/project-live
module          = project.wsgi
pidfile         = /srv/project-live/uwsgi/live.pid
daemonize       = /srv/project-live/logs/uwsgi.log
touch-reload    = /srv/project-live/uwsgi/touch.py
vacuum          = true

by doing

sudo service uwsgi restart

the service starts but the log file gives

*** Operational MODE: preforking ***
added /srv/project-live/ to pythonpath.
Traceback (most recent call last):
  File "./project/__init__.py", line 1, in <module>
    from __future__ import absolute_import
ImportError: No module named __future__

where i am going wrong??

Upvotes: 1

Views: 1381

Answers (1)

Yousuf Jawwad
Yousuf Jawwad

Reputation: 3097

it was looking for python plugin for uwsgi, which wasn't installed. after installing the plugin, everything worked just fine.

Upvotes: 1

Related Questions