Skip to content

Instantly share code, notes, and snippets.

@hangtwenty hangtwenty/
Last active Nov 6, 2019

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


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


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


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

pip uninstall -y livereload
pip install django-livereload-server

Or equivalent with your preferred package manager.

It's a simple issue really, but easy to miss. (I initially assumed django-livereload-server 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.