https://www.youtube.com/watch?v=AlJ8cGbk8ps i followed this video and when i do this command
django-admin makemessages -l ar
it gives me this error CommandError: Can't find msguniq. Make sure you have GNU gettext tools 0.15 or newer installed.
and i have installed pip install python-gettext
any aswers?
Thanks in advance
Asked
Active
Viewed 7,321 times
8

Yehia Yasser
- 75
- 1
- 6
-
2You need to install `msguniq` on your system. For a debian system, you can likely do this with `sudo apt-get install gettext`. – Willem Van Onsem Dec 18 '20 at 17:47
-
1i am widows not apple :-( @willem-van-onsem – Yehia Yasser Dec 18 '20 at 17:54
-
2Debian is not Apple. Debian is a linux distro. – Willem Van Onsem Dec 18 '20 at 17:55
1 Answers
12
and i have installed
pip install python-gettext
The problem is not the Python binding of gettext, it is the gettext library itself. This is not a Python library, but a system library.
You can install this on a debian-like system (Debian, Ubuntu, Raspbian, and Knoppix):
sudo apt-get install gettext
For other operating systems, you can probably build it from the source files, or look for a repository that makes binaries.

Willem Van Onsem
- 443,496
- 30
- 428
- 555
-
2it gives me this sudo: The term 'sudo' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. – Yehia Yasser Dec 18 '20 at 17:56
-
3@YehiaYasser: as specified this is for Debian systems: `sudo` is a way to get root access to the system. For Windows you will likely have to build `gettext` manually, or look for someone who made an installer from the source code. – Willem Van Onsem Dec 18 '20 at 17:57
-
1
-
4Apparently someone did that and made installation packages: https://mlocati.github.io/articles/gettext-iconv-windows.html – Willem Van Onsem Dec 18 '20 at 17:59
-
1it does not work man i extracted the file to the C:\Program Files\gettext-utils – Yehia Yasser Dec 18 '20 at 18:18
-
1@YehiaYasser: but you do not need to extract it, you need to *build* it too. You should include `msguniq` in the `PATH` variable. I don't know if the installer automates that somehow, I'm happy I didn't had to work on Windows machines for the last 12 years. – Willem Van Onsem Dec 18 '20 at 18:21
-
1Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/226146/discussion-between-yehia-yasser-and-willem-van-onsem). – Yehia Yasser Dec 18 '20 at 18:22
-
1@YehiaYasser: you likely should add the `bin` directory to the `PATH` environment variable, such that the command `msguniq` will invoke the program in the `bin` directory. – Willem Van Onsem Dec 18 '20 at 18:24
-
1done i have added this path C:\Program Files\gettext-utils\bin to the environment variable – Yehia Yasser Dec 18 '20 at 18:27
-
@YehiaYasser: so if you type `msguniq` in a terminal, this invokes the program? – Willem Van Onsem Dec 18 '20 at 18:30
-
-
@YehiaYasser: in a shell... Just like you invoke for example `python`..... – Willem Van Onsem Dec 18 '20 at 18:32
-
it give me this msguniq: The term 'msguniq' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. – Yehia Yasser Dec 18 '20 at 18:37
-
@YehiaYasser: then it is not in the PATH, or it at least did not "ripple" through the system: https://www.howtogeek.com/118594/how-to-edit-your-system-path-for-easy-command-line-access/ – Willem Van Onsem Dec 18 '20 at 18:38
-
https://www.facebook.com/yehiayasserahmed/this is my profile can we talk on messenger? – Yehia Yasser Dec 18 '20 at 18:41
-
-