MAC上安装gettext

在设置django国际化时 执行命令
python manage.py makemessages -l zh_hans
报错,
CommandError: Can’t find msguniq. Make sure you have GNU gettext tools 0.15 or newer installed.

MAC ,django1.9

解决方法:
1、/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
2、Install GNU gettext : brew install gettext
3、Create symlink : brew link gettext –force

第一步可以忽略,执行brew install gettext时会自动安装,第三步一定要执行,不执行第三步还会报错,切记!

posted @ 2021-08-17 19:54  死里学  阅读(904)  评论(0)    收藏  举报