ModuleNotFoundError: No module named 'registration'


#1

I used

% pip install django_registration_redux

After I installed 'django_registration_redux" for the Registration form, I got this error message:

% python manage.py runserver
Unhandled exception in thread started by <function check_errors..wrapper at 0x104625b70>
Traceback (most recent call last):
File “/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/django/utils/autoreload.py”, line 226, in wrapper
fn(args, **kwargs)
File “/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/django/core/management/commands/runserver.py”, line 113, in inner_run
autoreload.raise_last_exception()
File “/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/django/utils/autoreload.py”, line 249, in raise_last_exception
six.reraise(
_exception)
File “/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/django/utils/six.py”, line 685, in reraise
raise value.with_traceback(tb)
File “/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/django/utils/autoreload.py”, line 226, in wrapper
fn(*args, **kwargs)
File “/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/django/init.py”, line 27, in setup
apps.populate(settings.INSTALLED_APPS)
File “/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/django/apps/registry.py”, line 85, in populate
app_config = AppConfig.create(entry)
File “/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/django/apps/config.py”, line 90, in create
module = import_module(entry)
File “/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/importlib/init.py”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 978, in _gcd_import
File “”, line 961, in _find_and_load
File “”, line 948, in _find_and_load_unlocked
ModuleNotFoundError: No module named ‘registration’

% pip freeze
django-registration-redux==1.6

% find … -name ‘regis’ -print
/Users/mydir/www/virtualenv/lib/python3.6/site-packages/registration
/Users/mydir/www/virtualenv/lib/python3.6/site-packages/django_registration_redux-1.6.dist-info/

I use: Python 3.6, Django 1.10.6


#2
ModuleNotFoundError: No module named 're gistration'

Looks like you have a typo in your settings.py file under INSTALLED_APPS :)


#3

where do you see that? my settings is correct.

INSTALLED_APPS = [

‘registration’,
]


#4

That’s weird — your post was showing a space before, which is why it shows up in my quote.

Anyways, digging further, you need to install pip-registration-redux with dashes, not underscores:

pip install django-registration-redux==1.3

Try installing that instead?


#6

I finally figured out how to make it work. I moved the registration directory from the virtual env to the main python directory.