Python/Django shell won't start

前端 未结 2 494
清歌不尽
清歌不尽 2021-01-18 05:55

One of the great features of Django is that you can open a python interpreter set-up for use with your project. This can be used to analyse objects in a database and allows

相关标签:
2条回答
  • 2021-01-18 06:15

    It seems like IPython is installed wrongly somehow. Try starting the shell with:

    ./manage.py shell --plain
    

    to start the standard Python shell, rather than IPython. If that works, then trying removing IPython completely and reinstalling it.

    0 讨论(0)
  • 2021-01-18 06:31

    IPython 0.11 has a different API, for which a fix exists in the last Django versions.

    For older Django versions, you can use IPython 0.10, which does work:

    pip install ipython==0.10
    
    0 讨论(0)
提交回复
热议问题