库的安装 pip install wordcloud 安装会有些慢。从国外资源站下载的。耐心等待 词云体验-英文版 import wordcloud txt = 'live is short i use python' wc = wordcloud.WordCloud() wc.generate(txt) wc.to_file('test.png') 词云中文版