Thursday, June 1, 2017

Re: uWSGI ModuleNotFoundError Django 1.11

Here's the directory listing for my virtual environment:
(projectenv) [user@echo project]$ ls -al projectenv/bin/
total 84
drwxrwxr-x 3 user user  4096 Jun  1 14:28 .
drwxrwxr-x 5 user user  4096 Jun  1 14:26 ..
-rw-rw-r-- 1 user user  2095 Jun  1 14:26 activate
-rw-rw-r-- 1 user user  1037 Jun  1 14:26 activate.csh
-rw-rw-r-- 1 user user  2191 Jun  1 14:26 activate.fish
-rw-rw-r-- 1 user user  1137 Jun  1 14:26 activate_this.py
-rwxrwxr-x 1 user user   301 Jun  1 14:28 django-admin
-rwxrwxr-x 1 user user   159 Jun  1 14:28 django-admin.py
-rwxrwxr-x 1 user user   268 Jun  1 14:26 easy_install
-rwxrwxr-x 1 user user   268 Jun  1 14:26 easy_install-3.6
-rwxrwxr-x 1 user user   240 Jun  1 14:26 pip
-rwxrwxr-x 1 user user   240 Jun  1 14:26 pip3
-rwxrwxr-x 1 user user   240 Jun  1 14:26 pip3.6
drwxrwxr-x 2 user user  4096 Jun  1 14:28 __pycache__
lrwxrwxrwx 1 user user     9 Jun  1 14:26 python -> python3.6
lrwxrwxrwx 1 user user     9 Jun  1 14:26 python3 -> python3.6
-rwxrwxr-x 1 user user 17776 Jun  1 14:26 python3.6
-rwxrwxr-x 1 user user  2354 Jun  1 14:26 python-config
-rwxrwxr-x 1 user user   247 Jun  1 14:26 wheel


I followed the steps listed here :  https://www.digitalocean.com/community/tutorials/how-to-use-mysql-or-mariadb-with-your-django-application-on-ubuntu-14-04 

On Thursday, June 1, 2017 at 5:47:25 PM UTC-4, F. Nikita Thomas wrote:
No such thing as a dumb question, how  do I check? 

On Thursday, June 1, 2017 at 5:36:23 PM UTC-4, James Schneider wrote:
*** 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!

Dumb question. Have you verified that Django is installed in the virtualenv being used by uwsgi? You should be able to enter the virtualenv and run that specific import command that is outlined. 

-James 

--
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/9c9a3f18-7633-437c-a899-9f84e0df5040%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment