django createsuperuser not working

前端 未结 2 1502
长情又很酷
长情又很酷 2021-02-06 05:51

.bash_profile

export PATH=\"/Applications/MAMP/bin:/usr/local/bin:/usr/local/sbin:usr/local/$
export DYLD_LIBRARY_PATH=\"/usr/local/mysql/lib:$DYLD_LIBRARY_PAT         


        
相关标签:
2条回答
  • 2021-02-06 06:09

    The accepted answer didn't work for me, so I keep searching around and found this. It works for me. For sake of time saving I copy paste the two lines here. Enter this in terminal:

    $ LC_CTYPE=en_US.UTF-8
    $ LC_ALL=en_US.UTF-8
    

    Note: I use Mac OS 10.7 if that's relevant. Setting locale in system preference didn't work for me either.

    0 讨论(0)
  • 2021-02-06 06:23

    You are seeing this because you don't have locale set on your system. You need to set it in order to create superuser, it's known and reported "bug" already.

    see: https://code.djangoproject.com/ticket/17649

    Assuming that you're using linux you can fix that bug with

    export LANG="en_US.UTF-8"
    

    You use this in terminal, but you can easily check and see how to change locales on your system just googling.

    If you're using:

    Ubuntu - https://help.ubuntu.com/community/Locale/

    Archlinux - https://wiki.archlinux.org/index.php/Locale

    ...

    0 讨论(0)
提交回复
热议问题