Getting stuck at Django error: No module named registration

后端 未结 15 2200
一向
一向 2020-12-30 01:35

I installed the registration module, added it to settings.py. When I tried to run syncdb (% python sitename/manage.py syncdb --settings sitename.devsettings)

It gav

15条回答
  •  醉梦人生
    2020-12-30 01:51

    I ran into this problem because I was messing up with my virtualenv.

    I had two windows open:

    1. Running the server
    2. Running my commands

    I had successfully installed the Django-registration package into my venv on my Windows computer:

    $ . venv/Scripts/activate
    $ pip install Django-registration-redux==2.0
    

    But my server was not in the venv, so it could not find the package.

    Stopped the server, entered venv in that window, then restarted the server and all is good.

提交回复
热议问题