Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
W

word_cloud

> 编程语言
Open source

A little word cloud generator in Python

10.5K stars0 likes1 views
WebsiteGitHub

About

A little word cloud generator in Python

word_cloud

A little word cloud generator in Python. Read more about it on the blog post or the website.

The code is tested against Python 3.7, 3.8, 3.9, 3.10, 3.11, 3.12, 3.13.

Installation

If you are using pip:

bash
pip install wordcloud

If you are using conda, you can install from the conda-forge channel:

conda install -c conda-forge wordcloud

Installation notes

wordcloud depends on numpy, pillow, and matplotlib.

If there are no wheels available for your version of python, installing the package requires having a C compiler set up. Before installing a compiler, report an issue describing the version of python and operating system being used.

Examples

Check out examples/simple.py for a short intro. A sample output is:

Or run examples/masked.py to see more options. A sample output is:

Getting fancy with some colors:

Generating wordclouds for Arabic:

Command-line usage

The wordcloud_cli tool can be used to generate word clouds directly from the command-line:

$ wordcloud_cli --text mytext.txt --imagefile wordcloud.png

If you're dealing with PDF files, then pdftotext, included by default with many Linux distribution, comes in handy:

$ pdftotext mydocument.pdf - | wordcloud_cli --imagefile wordcloud.png

In the previous example, the - argument orders pdftotext to write the resulting text to stdout, which is then piped to the stdin of wordcloud_cli.py.

Use wordcloud_cli --help so see all available options.

Licensing

The wordcloud library is MIT licenced, but contains DroidSansMono.ttf, a true type font by Google, that is apache licensed. The font is by no means integral, and any other font can be used by setting the font_path variable when creating a WordCloud object.

Issues· 139 open

View all issuesOpen on GitHub
  • #443

    Conda for Python 3.7?

    Updated May 24, 2026
  • #423

    ci: appveyor triggers duplicated build

    Updated May 24, 2026
  • #401

    How do I set the transparent background

    Updated May 24, 2026
  • #379

    Exception with unicode in stopwords using wordcloud_cli.py

    Updated May 24, 2026
  • #205

    wc object not updating width and height if using mask

    Feature RequestUpdated May 24, 2026
  • #202

    Why a WordCloud shouldn't render numbers?

    Feature RequestUpdated May 24, 2026
  • #132

    generate_from_frequencies does not use the stoplist

    enhancementNeed ContributorUpdated May 24, 2026
  • #761

    Keeping together multi-word tokens

    Updated Dec 14, 2025
  • #805

    Pillow 12.0.0 causes Decompression Bomb Error

    Updated Dec 10, 2025
  • #781

    Text overlapping in SVG

    Updated Oct 9, 2025

> Tags

Python

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 29, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言