可以使用 pip 进行安装:
$ pip install pypinyin
汉语拼音转换工具(Python 版)
使用
Enter search terms or a module, class or function name.