A little word cloud generator in Python

Overview

licence DOI

Linux macOS Windows
PyPI CircleCI TravisCI AppVeyor

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 2.7, 3.4, 3.5, 3.6 and 3.7.

Installation

If you are using pip:

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 and pillow.

To save the wordcloud into a file, matplotlib can also be installed. See examples below.

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:

Constitution

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

Alice in Wonderland

Getting fancy with some colors: Parrot with rainbow colors

Generating wordclouds for Arabic:

Arabic wordlcloud

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
  • Wordcloud fails to install with pip under Windows 10 Python 3.5 Anaconda

    Wordcloud fails to install with pip under Windows 10 Python 3.5 Anaconda

    > pip install wordcloud
    

    Collecting wordcloud Using cached wordcloud-1.2.1.tar.gz Building wheels for collected packages: wordcloud Running setup.py bdist_wheel for wordcloud Complete output from command C:\Anaconda3\python.exe -c "import setuptools;file='C:\Users\vaast\AppData\Local\Temp\pip-build-xepnqb1f\wordcloud\setup.py';exec(compile(open(file).read().replace('\r\n', '\n'), file, 'exec'))" bdist_wheel -d C:\Users\vaast\AppData\Local\Temp\tmp5d658m49pip-wheel-: running bdist_wheel running build running build_py creating build creating build\lib.win-amd64-3.5 creating build\lib.win-amd64-3.5\wordcloud copying wordcloud\color_from_image.py -> build\lib.win-amd64-3.5\wordcloud copying wordcloud\wordcloud.py -> build\lib.win-amd64-3.5\wordcloud copying wordcloud\wordcloud_cli.py -> build\lib.win-amd64-3.5\wordcloud copying wordcloud__init__.py -> build\lib.win-amd64-3.5\wordcloud copying wordcloud\stopwords -> build\lib.win-amd64-3.5\wordcloud copying wordcloud\DroidSansMono.ttf -> build\lib.win-amd64-3.5\wordcloud running build_ext building 'wordcloud.query_integral_image' extension error: Unable to find vcvarsall.bat


    Failed building wheel for wordcloud Failed to build wordcloud Installing collected packages: wordcloud Running setup.py install for wordcloud Complete output from command C:\Anaconda3\python.exe -c "import setuptools, tokenize;file='C:\Users\vaast\AppData\Local\Temp\pip-build-xepnqb1f\wordcloud\setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record C:\Users\vaast\AppData\Local\Temp\pip-lonpl8b1-record\install-record.txt --single-version-externally-managed --compile: running install running build running build_py running build_ext building 'wordcloud.query_integral_image' extension error: Unable to find vcvarsall.bat

    ----------------------------------------
    

    Command "C:\Anaconda3\python.exe -c "import setuptools, tokenize;file='C:\Users\vaast\AppData\Local\Temp\pip-build-xepnqb1f\wordcloud\setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record C:\Users\vaast\AppData\Local\Temp\pip-lonpl8b1-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\vaast\AppData\Local\Temp\pip-build-xepnqb1f\wordcloud

    opened by vaastav 54
  • Value Error: ImageColorGenerator is smaller than the canvas

    Value Error: ImageColorGenerator is smaller than the canvas

    Description

    Hey I am definitely sure that my ImageColorGenerator is bigger than my canvas and I even tried to change the canvas width height to more and less but I am always getting this value error no matter what. Here is my code -

    Example:

    mask3 = np.array(Image.open(path.join(d, "test7.png")))
    wc = WordCloud(background_color="white", max_words=1000, mask=mask3,stopwords=q,
                   max_font_size=150, random_state=42)
    wc.generate(str4)
    # create coloring from image
    image_colors = ImageColorGenerator(mask3)
    print(image_colors.image.shape)
    print(wc.width, wc.height)
    plt.figure(figsize=[5,5])
    plt.tight_layout(pad=0)
    plt.imshow(wc.recolor(color_func=image_colors), interpolation="bilinear")
    plt.axis("off")
    plt.show()
    
    

    Explanation

    This Image test7 here is 800800 and I know that default canvas is 400200 I have another image which is 900*900 and that is working perfectly.

    Can you explain me as to how this is working and what is happening:

    output for test7 image ( the red thing with eyes)

    (800, 800, 4) 400 200

    Images

    This is the image with which it is working perfectly test1 This is the image which is showing error test7 This is the image to which I actually want to do it ultimately this image is 500*306 test8

    Please help

    opened by divyam28 38
  • Problem with query_integral_image + python 3

    Problem with query_integral_image + python 3

    I have tried to install wordcloud with Python 3.4 (OSX) and it seems I have some trouble with query_integral_image. The query_integral_image.so is present, but when I try to load it manually:

    ~/site-packages3/wordcloud (master)$ python3
    Python 3.4.1 (default, Aug 24 2014, 21:32:40)
    [GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.40)] on darwin
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import query_integral_image
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "wordcloud/query_integral_image.pyx", line 3, in init wordcloud.query_integral_image (wordcloud/query_integral_image.c:13451)
    SystemError: Parent module '' not loaded, cannot perform relative import
    >>>
    
    ~/site-packages3/wordcloud (master)$ pip3 freeze
    Cython==0.21.1
    Jinja2==2.7.3
    MarkupSafe==0.23
    Pillow==2.6.1
    certifi==14.05.14
    gensim==0.10.3
    gnureadline==6.3.3
    humanize==0.5
    ipython==2.3.1
    lxml==3.4.0
    matplotlib==1.4.0
    nose==1.3.4
    numpy==1.8.2
    pandas==0.14.1
    pyparsing==2.0.2
    python-dateutil==2.2
    pytz==2014.7
    pyzmq==14.4.1
    scikit-learn==0.15.2
    scipy==0.14.0
    six==1.7.3
    tornado==4.0.2
    wordcloud==1.0.0
    
    opened by cjauvin 38
  • Word cloud unicode (multilanguage) problem

    Word cloud unicode (multilanguage) problem

    Hi, I am using your wordcloud script for one of my projects and I am working on several many languages together(i.e let's say tweets from different languages amalgamated into a single text file). Now when I use your script to create a tag cloud, it does not work well for unicode characters (arabic,etc). Is there a way to fix it ? Does it support multilanguage ?

    foreign languages support 
    opened by samemon 36
  • Instillation failed with Python 2.7.5, Anaconda 3.14, Windows 7

    Instillation failed with Python 2.7.5, Anaconda 3.14, Windows 7

    Hi,

    The installation failed with Python 2.7.5, Anaconda 3.14, Windows 7. The fail message is:

    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-2.7
    creating build\lib.win-amd64-2.7\wordcloud
    copying wordcloud\color_from_image.py -> build\lib.win-amd64-2.7\wordcloud
    copying wordcloud\wordcloud.py -> build\lib.win-amd64-2.7\wordcloud
    copying wordcloud\__init__.py -> build\lib.win-amd64-2.7\wordcloud
    copying wordcloud\stopwords -> build\lib.win-amd64-2.7\wordcloud
    copying wordcloud\DroidSansMono.ttf -> build\lib.win-amd64-2.7\wordcloud
    running build_ext
    building 'wordcloud/query_integral_image' extension
    creating build\temp.win-amd64-2.7
    creating build\temp.win-amd64-2.7\Release
    creating build\temp.win-amd64-2.7\Release\wordcloud
    C:\strawberry\c\bin\gcc.exe -DMS_WIN64 -mdll -O -Wall -IC:\Anaconda\include -IC:\Anaconda\PC -c wordcloud/query_integral_image.c -o build\temp.win-amd64-2.7\Release\wordcloud\query_integral_image.o
    wordcloud/query_integral_image.c: In function '__Pyx_RaiseArgtupleInvalid':
    wordcloud/query_integral_image.c:13681:18: warning: unknown conversion type character 'z' in format [-Wformat]
    wordcloud/query_integral_image.c:13681:18: warning: format '%s' expects argument of type 'char *', but argument 5 has type 'Py_ssize_t' [-Wformat]
    wordcloud/query_integral_image.c:13681:18: warning: unknown conversion type character 'z' in format [-Wformat]
    wordcloud/query_integral_image.c:13681:18: warning: too many arguments for format [-Wformat-extra-args]
    wordcloud/query_integral_image.c: In function '__Pyx_BufFmt_ProcessTypeChunk':
    wordcloud/query_integral_image.c:14052:26: warning: unknown conversion type character 'z' in format [-Wformat]
    wordcloud/query_integral_image.c:14052:26: warning: unknown conversion type character 'z' in format [-Wformat]
    wordcloud/query_integral_image.c:14052:26: warning: too many arguments for format [-Wformat-extra-args]
    wordcloud/query_integral_image.c:14104:20: warning: unknown conversion type character 'z' in format [-Wformat]
    wordcloud/query_integral_image.c:14104:20: warning: unknown conversion type character 'z' in format [-Wformat]
    wordcloud/query_integral_image.c:14104:20: warning: too many arguments for format [-Wformat-extra-args]
    wordcloud/query_integral_image.c: In function '__pyx_buffmt_parse_array':
    wordcloud/query_integral_image.c:14166:25: warning: unknown conversion type character 'z' in format [-Wformat]
    wordcloud/query_integral_image.c:14166:25: warning: format '%d' expects argument of type 'int', but argument 3 has type 'size_t' [-Wformat]
    wordcloud/query_integral_image.c:14166:25: warning: too many arguments for format [-Wformat-extra-args]
    wordcloud/query_integral_image.c: In function '__Pyx_GetBufferAndValidate':
    wordcloud/query_integral_image.c:14351:7: warning: unknown conversion type character 'z' in format [-Wformat]
    wordcloud/query_integral_image.c:14351:7: warning: format '%s' expects argument of type 'char *', but argument 3 has type 'Py_ssize_t' [-Wformat]
    wordcloud/query_integral_image.c:14351:7: warning: unknown conversion type character 'z' in format [-Wformat]
    wordcloud/query_integral_image.c:14351:7: warning: too many arguments for format [-Wformat-extra-args]
    wordcloud/query_integral_image.c: In function '__Pyx_RaiseTooManyValuesError':
    wordcloud/query_integral_image.c:14882:18: warning: unknown conversion type character 'z' in format [-Wformat]
    wordcloud/query_integral_image.c:14882:18: warning: too many arguments for format [-Wformat-extra-args]
    wordcloud/query_integral_image.c: In function '__Pyx_RaiseNeedMoreValuesError':
    wordcloud/query_integral_image.c:14888:18: warning: unknown conversion type character 'z' in format [-Wformat]
    wordcloud/query_integral_image.c:14888:18: warning: format '%s' expects argument of type 'char *', but argument 3 has type 'Py_ssize_t' [-Wformat]
    wordcloud/query_integral_image.c:14888:18: warning: too many arguments for format [-Wformat-extra-args]
    wordcloud/query_integral_image.c: In function '__Pyx_ValidateAndInit_memviewslice':
    wordcloud/query_integral_image.c:15644:22: warning: unknown conversion type character 'z' in format [-Wformat]
    wordcloud/query_integral_image.c:15644:22: warning: format '%s' expects argument of type 'char *', but argument 3 has type 'Py_ssize_t' [-Wformat]
    wordcloud/query_integral_image.c:15644:22: warning: unknown conversion type character 'z' in format [-Wformat]
    wordcloud/query_integral_image.c:15644:22: warning: too many arguments for format [-Wformat-extra-args]
    writing build\temp.win-amd64-2.7\Release\wordcloud\query_integral_image.def
    C:\strawberry\c\bin\gcc.exe -DMS_WIN64 -shared -s build\temp.win-amd64-2.7\Release\wordcloud\query_integral_image.o build\temp.win-amd64-2.7\Release\wordcloud\query_integral_image.def -LC:\Anaconda\libs -LC:\Anaconda\PCbuild\amd64 -lpython27 -lmsvcr90 -o build\lib.win-amd64-2.7\wordcloud\query_integral_image.pyd Cannot export initwordcloud/query_integral_image: symbol not defined
    collect2.exe: error: ld returned 1 exit status
    error: command 'gcc' failed with exit status 1
    

    Any ideas?

    opened by joshlk 35
  • Deployement of wheels and website: Remaing tasks

    Deployement of wheels and website: Remaing tasks

    Remaining tasks are copied from https://github.com/amueller/word_cloud/pull/403:

    Once this is integrated, we could:

    • [x] enable flake8
    • [x] automatic deployment of the website on merge to master
    • [x] fix code and enable generation of wheels for python 3.7.
    enhancement 
    opened by jcfr 26
  • Failed to import wordcloud - DLL load failed

    Failed to import wordcloud - DLL load failed

    Hey,

    I am getting the error as below:

    ---------------------------------------------------------------------------
    ImportError                               Traceback (most recent call last)
    <ipython-input-14-dc1828f2a80e> in <module>()
    ----> 1 import wordcloud
    
    ~\AppData\Local\Continuum\anaconda3\lib\site-packages\wordcloud\__init__.py in <module>()
    ----> 1 from .wordcloud import (WordCloud, STOPWORDS, random_color_func,
          2                         get_single_color_func)
          3 from .color_from_image import ImageColorGenerator
          4 
          5 __all__ = ['WordCloud', 'STOPWORDS', 'random_color_func',
    
    ~\AppData\Local\Continuum\anaconda3\lib\site-packages\wordcloud\wordcloud.py in <module>()
         17 from operator import itemgetter
         18 
    ---> 19 from PIL import Image
         20 from PIL import ImageColor
         21 from PIL import ImageDraw
    
    ~\AppData\Local\Continuum\anaconda3\lib\site-packages\PIL\Image.py in <module>()
         56     # Also note that Image.core is not a publicly documented interface,
         57     # and should be considered private and subject to change.
    ---> 58     from . import _imaging as core
         59     if PILLOW_VERSION != getattr(core, 'PILLOW_VERSION', None):
         60         raise ImportError("The _imaging extension was built for another "
    
    ImportError: DLL load failed: The specified module could not be found.
    
    opened by dushmshr 26
  • ImportError: No module named wordcloud

    ImportError: No module named wordcloud

    Hi there,

    I am attempting to use your wordcloud package but am having some trouble importing into my Python Notebook (I'm using Anaconda on Mac btw).

    I use the pip install wordcloud command and everything seems to run smoothly. It shows up in my /anaconda/lib/python2.7/site-packages folder.

    Now, when I go to my python notebook, I try to run import wordcloud and it gives me the error shown in the title.

    Any help would be much appreciated.

    opened by ghost 25
  • Add to_svg

    Add to_svg

    This is another tentative at vector file export. I initially did some experiments using freetype-py, but I was able to get the same results using Pillow bindings of FreeType (there are inconsistencies, though).

    There are however slight mismatches between rasterized and vector outputs. I also spotted inconsistencies using different browsers for some fonts (e.g. Segoe Script). I added an option (embed_image) to include the output of to_image in the SVG file, which is useful for debugging. I believe most differences are due to subtleties in kerning and ligatures, which is not significant in common fonts.

    It may also be useful to consider embedding the font file directly in the SVG file (or only the required subset, ideally). As my personal use case does not require fancy fonts, I did not dig any further on this topic. This means that using the default font will render properly only if Droid Sans Mono is available to the SVG reader.

    I have attached two modified examples, which use different fonts for portability.

    Also, contour is not implemented.

    Last but not least, I want to credit @jnothman and his pull request (in particular, his hack to detect font name/weight/style). As I am not fluent in forks and pull requests, I had to create a new pull request. But I would be glad to learn how to extend an existing pull request!

    opened by jojolebarjos 23
  • safe conda installation commands not working for 64bit machines Windows or Mac

    safe conda installation commands not working for 64bit machines Windows or Mac

    Past experience tells me it is best to use the conda installation commands where possible or your Anaconda environment can get corrupted. I tried both the conda and conda-forge installation commands on both my new MacBook Pro and my old Windows 7 64bit machines and in both cases got the error message "PackageNotFoundError" noting package not found in win-64 or osx-64 channels respectively. Can this be addressed?

    To help, these commands produced above error:

    On conda site provided here: https://anaconda.org/conda-forge/wordcloud conda install -c conda-forge wordcloud

    On your site tried the conda install path and it failed.

    I then gambled on doing a pip install on my old windows machine since it has multiple Anaconda Python 3.6 environments and got a slew of errors and the installation failed to go through. Error text from that failed installation:

    Command "C:\ProgramFilesCoders\Anaconda2\envs\PY36_clone\python.exe -u -c "impor t setuptools, tokenize;file='C:\Users\Mitch\AppData\Local\Temp\pip-bui ld-8tqklaya\wordcloud\setup.py';f=getattr(tokenize, 'open', open)(file);co de=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec') )" install --record C:\Users\Mitch\AppData\Local\Temp\pip-wahu2bsu-record\instal l-record.txt --single-version-externally-managed --compile" failed with error co de 1 in C:\Users\Mitch\AppData\Local\Temp\pip-build-8tqklaya\wordcloud\

    opened by TheMitchWorksPro 23
  • Failed building wheel for wordcloud

    Failed building wheel for wordcloud

    Trying to install wordcloud on windows 7. Getting the following error Failed to build wordcloud Installing collected packages: wordcloud Running setup.py install for wordcloud Complete output from command C:\Users\nitin.agarwal\AppData\Local\Continuum
    Anaconda3\python.exe -c "import setuptools, tokenize;file='C:\Users\NITIN~ 1.AGA\AppData\Local\Temp\pip-build-r2gzu169\wordcloud\setup.py';exec(compi le(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), fil e, 'exec'))" install --record C:\Users\NITIN~1.AGA\AppData\Local\Temp\pip-gdv7 89h9-record\install-record.txt --single-version-externally-managed --compile: running install running build running build_py running build_ext building 'wordcloud.query_integral_image' extension error: [WinError 2] The system cannot find the file specified

    ----------------------------------------
    

    Command "C:\Users\nitin.agarwal\AppData\Local\Continuum\Anaconda3\python.exe -c "import setuptools, tokenize;file='C:\Users\NITIN~1.AGA\AppData\Local\T emp\pip-build-r2gzu169\wordcloud\setup.py';exec(compile(getattr(tokenize, 'op en', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install - -record C:\Users\NITIN~1.AGA\AppData\Local\Temp\pip-gdv789h9-record\install-reco rd.txt --single-version-externally-managed --compile" failed with error code 1 i n C:\Users\NITIN~1.AGA\AppData\Local\Temp\pip-build-r2gzu169\wordcloud

    opened by agarnitin86 23
  • DeprecationWarning: ROTATE_90 is deprecated and will be removed in Pillow 10

    DeprecationWarning: ROTATE_90 is deprecated and will be removed in Pillow 10

    Description

    While running some test on my last project, I received this warning in the pytest console output:

    /home/user/Documents/Python/Wordcloud_Youtube/.venv/lib/python3.10/site-packages/wordcloud/wordcloud.py:513: DeprecationWarning: ROTATE_90 is deprecated and will be removed in Pillow 10 (2023-07-01). Use Transpose.ROTATE_90 instead. Image.ROTATE_90)

    So apparently, an update is needed related to Pillow.

    My package versions: wordcloud = "^1.8.1" Pillow = "^9.1.1"

    opened by Guillaume-Fgt 0
  • Unable to install via pip on Python 3.10.4

    Unable to install via pip on Python 3.10.4

    Description

    When attempting to install wordcloud using pip on python version 3.10.4, the install fails with a subprocess-exited-with-error error and a legacy-install-failure error.

    Steps/Code to Reproduce

    1. Open a new Windows Powershell window (I'm using PowerShell 7.2.4 in Windows Terminal)
    2. Ensure Python 3.10.4 is the default version
    3. Attempt to install by typing pip install wordcloud

    Expected Results

    Library installs correctly.

    Actual Results

    ` Running setup.py install for wordcloud ... error error: subprocess-exited-with-error

    × Running setup.py install for wordcloud did not run successfully. │ exit code: 1 ╰─> [20 lines of output] running install running build running build_py creating build creating build\lib.win-amd64-3.10 creating build\lib.win-amd64-3.10\wordcloud copying wordcloud\color_from_image.py -> build\lib.win-amd64-3.10\wordcloud copying wordcloud\tokenization.py -> build\lib.win-amd64-3.10\wordcloud copying wordcloud\wordcloud.py -> build\lib.win-amd64-3.10\wordcloud copying wordcloud\wordcloud_cli.py -> build\lib.win-amd64-3.10\wordcloud copying wordcloud_version.py -> build\lib.win-amd64-3.10\wordcloud copying wordcloud_init_.py -> build\lib.win-amd64-3.10\wordcloud copying wordcloud_main_.py -> build\lib.win-amd64-3.10\wordcloud copying wordcloud\stopwords -> build\lib.win-amd64-3.10\wordcloud copying wordcloud\DroidSansMono.ttf -> build\lib.win-amd64-3.10\wordcloud UPDATING build\lib.win-amd64-3.10\wordcloud/_version.py set build\lib.win-amd64-3.10\wordcloud/_version.py to '1.8.1' running build_ext building 'wordcloud.query_integral_image' extension error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/ [end of output]

    note: This error originates from a subprocess, and is likely not a problem with pip. error: legacy-install-failure

    × Encountered error while trying to install package. ╰─> wordcloud

    note: This is an issue with the package mentioned above, not pip. hint: See above for output from the failure.`

    Versions

    Windows-10-10.0.25115-SP0 Python 3.10.4 (tags/v3.10.4:9d38120, Mar 23 2022, 23:13:41) [MSC v.1929 64 bit (AMD64)] NumPy 1.22.2 matplotlib 3.5.2 wordcloud version not applicable

    opened by Marcus5408 0
  • Diacritic characters not rendering in wordcloud image

    Diacritic characters not rendering in wordcloud image

    Hi, thanks for the nice wordcloud library! I am having trouble with certain diacritic characters. E.g., the diacritic marks in the word Kṛṣṇa are not recognized. I get the following output:

    wordcloud-diacritics-krsna

    This is my code:

    text = ""
    with open("test.txt", "r", encoding="utf-8") as f:
        text = f.read()
        
    import wordcloud
    from wordcloud import WordCloud
    import matplotlib.pyplot as plt
    
    wordcloud = WordCloud(width = 800, height = 800,
                    background_color ='white',
                    min_font_size = 10).generate(text)
                      
    plt.figure(figsize = (8, 8), facecolor = None)
    plt.imshow(wordcloud)
    plt.axis("off")
    plt.tight_layout(pad = 0)
    plt.show()
    

    I attach the test file test.txt as well:

    test.txt

    Originally posted by @kodymoodley in https://github.com/amueller/word_cloud/issues/148#issuecomment-1114707204

    opened by kodymoodley 1
  • cannot import wordcloud in Python 3.9, macOS

    cannot import wordcloud in Python 3.9, macOS

    wordcloud cannot be installed via pip, so I tried: conda install -c [https://conda.anaconda.org/conda-forge wordcloud

    It seemed to be working: pip freeze ... wordcloud @ file:///Users/runner/miniforge3/conda-bld/wordcloud_1637007722518/work ...

    or pip list: ... wordcloud 1.8.1 ...

    However, when importing: import wordcloud ModuleNotFoundError: No module named 'wordcloud'

    Versions

    macOS-12.3.1-x86_64-i386-64bit Python 3.9.12 (v3.9.12:b28265d7e6, Mar 23 2022, 18:22:40) [Clang 13.0.0 (clang-1300.0.29.30)] NumPy 1.22.3 matplotlib 3.5.1

    import wordcloud; print("wordcoud", wordcloud.version) Traceback (most recent call last): File "<pyshell#8>", line 1, in import wordcloud; print("wordcoud", wordcloud.version) ModuleNotFoundError: No module named 'wordcloud' -->

    Thank you for helping!

    opened by FLoraHtg 0
  • generate a word cloud with a background color?

    generate a word cloud with a background color?

    Description

    image

    I want to use modules to generate a word cloud with a background, just like an image. But I can't find an example.

    Steps/Code to Reproduce

    Expected Results

    Now I can generate the word cloud and the font color comes from the image, but the background is confusing me.

    Actual Results

    Picture, word clouds with background colors

    Versions

    opened by kev1nzh37 0
Releases(1.5.0)
Owner
Andreas Mueller
Scikit-learn core-developer, Principal Research SDE @microsoft
Andreas Mueller
Wikipedia WordCloud App generate Wikipedia word cloud art created using python's streamlit, matplotlib, wikipedia and wordcloud packages

Wikipedia WordCloud App Wikipedia WordCloud App generate Wikipedia word cloud art created using python's streamlit, matplotlib, wikipedia and wordclou

Siva Prakash 5 Jan 2, 2022
Farhad Davaripour, Ph.D. 1 Jan 5, 2022
A little logger for machine learning research

dowel dowel is a little logger for machine learning research. Installation pip install dowel Usage import dowel from dowel import logger, tabular log

Reinforcement Learning Working Group 24 Mar 22, 2022
:art: Diagram as Code for prototyping cloud system architectures

Diagrams Diagram as Code. Diagrams lets you draw the cloud system architecture in Python code. It was born for prototyping a new system architecture d

MinJae Kwon 18.4k May 21, 2022
Some method of processing point cloud

Point-Cloud Some method of processing point cloud inversion the completion pointcloud to incomplete point cloud Some model of encoding point cloud to

Tan 1 Nov 19, 2021
Visual Python is a GUI-based Python code generator, developed on the Jupyter Notebook environment as an extension.

Visual Python is a GUI-based Python code generator, developed on the Jupyter Notebook environment as an extension.

Visual Python 411 May 24, 2022
Pyan3 - Offline call graph generator for Python 3

Pyan takes one or more Python source files, performs a (rather superficial) static analysis, and constructs a directed graph of the objects in the combined source, and how they define or use each other. The graph can be output for rendering by GraphViz or yEd.

Juha Jeronen 197 May 25, 2022
A Python-based non-fungible token (NFT) generator built using Samilla and Matplotlib

PyNFT A Pythonic NF (non-fungible token) generator built using Samilla and Matplotlib Use python pynft.py [amount] The intention behind this generato

Ayush Gundawar 6 Feb 7, 2022
An easy to use burndown chart generator for GitHub Project Boards.

Burndown Chart for GitHub Projects An easy to use burndown chart generator for GitHub Project Boards. Table of Contents Features Installation Assumpti

Joseph Hale 7 May 13, 2022
Simple plotting for Python. Python wrapper for D3xter - render charts in the browser with simple Python syntax.

PyDexter Simple plotting for Python. Python wrapper for D3xter - render charts in the browser with simple Python syntax. Setup $ pip install PyDexter

D3xter 31 Mar 6, 2021
A Python Binder that merge 2 files with any extension by creating a new python file and compiling it to exe which runs both payloads.

Update ! ANONFILE MIGHT NOT WORK ! About A Python Binder that merge 2 files with any extension by creating a new python file and compiling it to exe w

Vesper 12 May 15, 2022
Declarative statistical visualization library for Python

Altair http://altair-viz.github.io Altair is a declarative statistical visualization library for Python. With Altair, you can spend more time understa

Altair 7.5k May 28, 2022
Interactive Data Visualization in the browser, from Python

Bokeh is an interactive visualization library for modern web browsers. It provides elegant, concise construction of versatile graphics, and affords hi

Bokeh 16.3k May 18, 2022
Cartopy - a cartographic python library with matplotlib support

Cartopy is a Python package designed to make drawing maps for data analysis and visualisation easy. Table of contents Overview Get in touch License an

null 1.1k May 23, 2022
A grammar of graphics for Python

plotnine Latest Release License DOI Build Status Coverage Documentation plotnine is an implementation of a grammar of graphics in Python, it is based

Hassan Kibirige 3.1k May 19, 2022
a plottling library for python, based on D3

Hello August 2013 Hello! Maybe you're looking for a nice Python interface to build interactive, javascript based plots that look as nice as all those

Mike Dewar 1.4k May 20, 2022
UNMAINTAINED! Renders beautiful SVG maps in Python.

Kartograph is not maintained anymore As you probably already guessed from the commit history in this repo, Kartograph.py is not maintained, which mean

null 1k May 14, 2022
Tools for writing, submitting, debugging, and monitoring Storm topologies in pure Python

Petrel Tools for writing, submitting, debugging, and monitoring Storm topologies in pure Python. NOTE: The base Storm package provides storm.py, which

AirSage 247 Dec 18, 2021
The Python ensemble sampling toolkit for affine-invariant MCMC

emcee The Python ensemble sampling toolkit for affine-invariant MCMC emcee is a stable, well tested Python implementation of the affine-invariant ense

Dan Foreman-Mackey 1.2k May 18, 2022