0

So, im new to Django and for the sake of learning im trying to get a project up with allauth while extending AbstractBaseUser. The project starts, there is no problem there, the login screen from allauth displays my custom model (login with email). But when i try to create a superuser i get the following error.

    Traceback (most recent call last):
  File "manage.py", line 21, in <module>
    main()
  File "manage.py", line 17, in main
    execute_from_command_line(sys.argv)
  File "C:\users\bramv\appdata\local\programs\python\python38\lib\site-packages\django\core\management\__init__.py", line 401, in execute_from_command_line
    utility.execute()
  File "C:\users\bramv\appdata\local\programs\python\python38\lib\site-packages\django\core\management\__init__.py", line 377, in execute
    django.setup()
  File "C:\users\bramv\appdata\local\programs\python\python38\lib\site-packages\django\__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "C:\users\bramv\appdata\local\programs\python\python38\lib\site-packages\django\apps\registry.py", line 91, in populate
    app_config = AppConfig.create(entry)
  File "C:\users\bramv\appdata\local\programs\python\python38\lib\site-packages\django\apps\config.py", line 90, in create
    module = import_module(entry)
  File "C:\users\bramv\appdata\local\programs\python\python38\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'allauth'

I did setup a virtualenv and installed django-allauth with pip and i followed the install instructions from the django-allauth docs. I fail to see where this error is comming from, any help would be greatly appreciated.

Bram
  • 33
  • 3

1 Answers1

0

Install the library first. In your console:

pip install django-allauth
jTiKey
  • 696
  • 5
  • 13
  • Thanks for your answer, it didnt even cross my mind, when i look at the tracestack now it is so obvious. I still dont get why it is needed when i already have it installed in the virtual environment. – Bram Apr 04 '20 at 06:27