Cookiecutter-django: CommandError: Can't find msgfmt. Make sure you have GNU gettext tools 0.15 or newer installed.

Created on 26 Sep 2017  路  4Comments  路  Source: pydanny/cookiecutter-django

Note: for support questions, please use the cookiecutter-django tag on stackoverflow. This repository's issues are reserved for feature requests and bug reports. If you need quick professional paid support for your project, contact [email protected].

  • *I'm submitting a ... *

    • [ ] bug report
    • [ ] feature request
    • [ ] support request => Please do not submit support request here, see note at the top of this template.
  • Do you want to request a feature or report a bug?

  • What is the current behavior?

sudo docker-compose -f local.yml run django python manage.py compilemessages

CommandError: Can't find msgfmt. Make sure you have GNU gettext tools 0.15 or newer installed.

But in OS gettext and msgfmt already installed..

  • If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem

This happens in any cookieecutter-django project, where I try to use gettext

  • What is the expected behavior?

I want to create files in the locale folder in the languages I have chosen.

  • What is the motivation / use case for changing the behavior?

  • Please tell us about your environment:

  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc)

Most helpful comment

Add gettext and msgfmt to your compose/local/django/Dockerfile and re-build the image.

RUN apt-get update && apt-get install -y \
gettext \

All 4 comments

You're using Docker, hence, gettrxt must be installed in the django services Dockerfile.

Add gettext and msgfmt to your compose/local/django/Dockerfile and re-build the image.

RUN apt-get update && apt-get install -y \
gettext \

@sfdye
E: Unable to locate package msgfmt

@narnikgamarnikus

which msgfmt

It should be installed already.

Was this page helpful?
0 / 5 - 0 ratings