Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Quick note - how to fix django-livereload import error


ImportError: cannot import name 'livereload_port' from 'livereload'


You have both livereload and django-livereload installed. Most likely, one was installed before the other, and having both is an accident.


Assuming it's OK to just move to django-livereload, get rid of your code that imports or uses livereload directly. Then:

pip uninstall -y livereload
pip install django-livereload

Or equivalent with your preferred package manager. It's a simple issue really, but easy to miss. (I initially assumed django-livereload wrapped livereload, but rather it's "inspired by" and they have a namespace collision if you install both. Easy fix though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.