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
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.