Skip to content Skip to sidebar Skip to footer

Pycharm Ide Tries To Load Django Script From Sh Instead Of Bash

If i try to compile messages in Django I get erros like this: sh: msgfmt: command not found while from bash (terminal) all these commands work fine.. How do I change Pycharm to ru

Solution 1:

Actually PyCharm itself doesn't use either sh or bash to run these commands; it runs the manage.py Python script using the interpreter configured in Settings | Python Interpreters. The compilemessages command uses os.system() Python function to run the msgfmt command. The os.system() function runs the system() C function, which always uses /bin/sh.

Therefore, you need to configure your OS in such a way that msgfmt could be run from /bin/sh.

Solution 2:

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.

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.

Post a Comment for "Pycharm Ide Tries To Load Django Script From Sh Instead Of Bash"