python manage.py runserver, shell, dbshell freezes on git-bash

后端 未结 3 735
被撕碎了的回忆
被撕碎了的回忆 2020-12-31 12:04

I\'m trying to run the interactive shell in python virtualenv in windows, on git-bash, but it isn\'t running. Strange thing is, it doesn\'t seem to do anything, just the cur

3条回答
  •  死守一世寂寞
    2020-12-31 12:52

    The problem is python.exe itself has issues with gitbash. Supposedly, it has something to do with the ncurses library.

    The solution is to type "winpty python.exe" instead of python. "winpty python.exe manage.py shell" should work. You can also create an alias to bypass the issue. Typing "alias python='winpty python.exe'" will make it so "python manage.py shell" works as it should.

    This answer explains it better: Python not working in the command line of git bash

提交回复
热议问题