Thursday, June 1, 2017

Re: uWSGI ModuleNotFoundError Django 1.11

Hi Melvyn,
excuse the late reply. I just tried as you suggested and now I have:
(projectenv) [user@echo project]$ uwsgi --http :8000 --chdir /home/user/Env/project/ --module project.wsgi --virtualenv /home/user/Env/projectenv/
*** Starting uWSGI 2.0.15 (64bit) on [Thu Jun  1 17:09:34 2017] ***
compiled with version: 4.8.5 20150623 (Red Hat 4.8.5-11) on 30 May 2017 20:50:53
os: Linux-3.10.0-514.10.2.el7.x86_64 #1 SMP Fri Mar 3 00:04:05 UTC 2017
nodename: echo.com
machine: x86_64
clock source: unix
pcre jit disabled
detected number of CPU cores: 2
current working directory: /home/user/Env/project
detected binary path: /usr/local/bin/uwsgi
chdir() to /home/atticus/Env/project/
*** WARNING: you are running uWSGI without its master process manager ***
your processes number limit is 4096
your memory page size is 4096 bytes
detected max file descriptor number: 1024
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
uWSGI http bound on :8000 fd 4
spawned uWSGI http 1 (pid: 22389)
uwsgi socket 0 bound to TCP address 127.0.0.1:34994 (port auto-assigned) fd 3
Python version: 3.6.1 (default, May 29 2017, 14:21:37)  [GCC 4.8.5 20150623 (Red Hat 4.8.5-11)]
Set PythonHome to /home/user/Env/projectenv/
*** Python threads support is disabled. You can enable it with --enable-threads ***
Python main interpreter initialized at 0x76b6d0
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
mapped 72768 bytes (71 KB) for 1 cores
*** Operational MODE: single process ***
Traceback (most recent call last):
  File "./project/wsgi.py", line 12, in <module>
    from django.core.wsgi import get_wsgi_application
ModuleNotFoundError: No module named 'django'
unable to load app 0 (mountpoint='') (callable not found or import error)
*** no app loaded. going in full dynamic mode ***
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI worker 1 (and the only) (pid: 22388, cores: 1)
^C

Shouldn't it see the Django installation in the virtualenv? I haven't had this much fun since I had my wisdom teeth removed .... Thanks again!

On Thursday, June 1, 2017 at 2:27:28 PM UTC-4, Melvyn Sopacua wrote:

On Thursday 01 June 2017 10:47:05 F. Nikita Thomas wrote:

> Hi!

> I'm having a problem with configuring uWSGI with Django, when I run

> the development server everything 'seems' okay, except that I am

> missing styling on the html, and when I test run uWSGI from the

> command line I get:

 

...

> chdir() to /home/user/env/project/project/

...

 

> And I don't know whether it's a path or import thing or what. Thanks.

 

It's a chdir thing. Move up one, so /home/user/env/project.

 

--

Melvyn Sopacua

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/e083928c-3e99-4110-b4c9-c510a474e89b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment