How do I deploy Django with Apache2 on Ubuntu 19.10?

Linode Staff

I tried to install Django on my Linode, but my Apache logfile says:

ImportError: No module named django.core.wsgi

I have already installed wsgi.

1 Reply

The following article may be related to your situation:

https://stackoverflow.com/questions/14927345/importerror-no-module-named-django-core-wsgi-apache-virtualenv-aws-wsgi

It suggests that this issue is not caused by a missing package, but by a broken/missing path in a wsgi.py file.

Can you compare the "wsgi.py" files in your working project to the one that does not work and see if you are able to find a difference that might be relevant in the lines that say?:

sys.path.append(' . . . .')

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct