Pycharm IDE tries to load django script from sh instead of bash(Pycharm IDE 尝试从 sh 而不是 bash 加载 django 脚本)
问题描述
如果我尝试在 Django 中编译消息,我会得到如下错误:
If i try to compile messages in Django I get erros like this:
sh: msgfmt: command not found
虽然从 bash(终端)所有这些命令都可以正常工作.我如何更改 Pycharm 以从 bash 而不是 sh 运行这些命令?
while from bash (terminal) all these commands work fine.. How do I change Pycharm to run these commands from bash instead of sh ?
谢谢
推荐答案
这个问题可以通过安装gettext
工具解决,在debian/ubuntu下可以执行sudo apt-get install gettext
,对于 windows 的解释在 django文档.
This problem can be solved by installing gettext
tool, in debian/ubuntu you can execute sudo apt-get install gettext
, for windows is explained in django doc.
另请参阅 此 和 this 用于其他 SO 和解释.
Also see this and this for others SO and explanations.
我收到了同样的错误信息,但由于其他原因并以这种方式解决.
I got the same error message but from other cause and solve it in this way.
这篇关于Pycharm IDE 尝试从 sh 而不是 bash 加载 django 脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!