Django Error: cannot import name autodiscover_modules
Question: I meet this error when I deploy my Django project on another VPS. The same
codes can run successfully on my Macbook and a staging VPS.

My website based on Django 1.4.20, and import some third python library and
Django apps, for example redis-py, requests, django-import-export, django-
kronos, django-cors-headers. I install these by pip install etc

I'm really confused how these happen. Maybe it's a library dependency problem,
but I can't find detail error log or stacks. Thanks for your time.


Answer: You should have a `requirements.txt` with your webapp. Then do `pip install -r
requirements.txt` when you deploy.

If you did not make such a file, you can create one later by running `pip
freeze > requirements.txt`. But beware that there might be some packages there
that are not needed, if you installed other stuff on the side, so be prepared
to manually screen the file.

If you work with multiple webapps you may also need to containerize your
requirements ([here's why](https://en.wikipedia.org/wiki/Dependency_hell)).
Two options: [Docker](https://www.docker.com) or
[virtualenv](https://virtualenv.pypa.io/en/latest/). If you don't know what
Docker is and don't have some time on your hands I suggest you go with
Virtualenv for now.

