amueller / word_cloud

A little word cloud generator in Python
https://amueller.github.io/word_cloud
MIT License
10.19k stars 2.32k forks source link

Not installing on windows 11 with python 3.11 #702

Closed burhankhanzada closed 1 year ago

burhankhanzada commented 1 year ago

Microsoft Windows [Version 10.0.22621.900] (c) Microsoft Corporation. All rights reserved.

C:\Users\Burhan>python -V Python 3.11.0

C:\Users\Burhan>pip install wordcloud Collecting wordcloud Using cached wordcloud-1.8.2.2.tar.gz (220 kB) Preparing metadata (setup.py) ... done Requirement already satisfied: numpy>=1.6.1 in d:\python\lib\site-packages (from wordcloud) (1.23.5) Requirement already satisfied: pillow in d:\python\lib\site-packages (from wordcloud) (9.3.0) Requirement already satisfied: matplotlib in d:\python\lib\site-packages (from wordcloud) (3.6.2) Requirement already satisfied: contourpy>=1.0.1 in d:\python\lib\site-packages (from matplotlib->wordcloud) (1.0.6) Requirement already satisfied: cycler>=0.10 in d:\python\lib\site-packages (from matplotlib->wordcloud) (0.11.0) Requirement already satisfied: fonttools>=4.22.0 in d:\python\lib\site-packages (from matplotlib->wordcloud) (4.38.0) Requirement already satisfied: kiwisolver>=1.0.1 in d:\python\lib\site-packages (from matplotlib->wordcloud) (1.4.4) Requirement already satisfied: packaging>=20.0 in d:\python\lib\site-packages (from matplotlib->wordcloud) (21.3) Requirement already satisfied: pyparsing>=2.2.1 in d:\python\lib\site-packages (from matplotlib->wordcloud) (3.0.9) Requirement already satisfied: python-dateutil>=2.7 in d:\python\lib\site-packages (from matplotlib->wordcloud) (2.8.2) Requirement already satisfied: six>=1.5 in d:\python\lib\site-packages (from python-dateutil>=2.7->matplotlib->wordcloud) (1.16.0) Building wheels for collected packages: wordcloud Building wheel for wordcloud (setup.py) ... error error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [26 lines of output] running bdist_wheel running build running build_py creating build creating build\lib.win-amd64-cpython-311 creating build\lib.win-amd64-cpython-311\wordcloud copying wordcloud\color_from_image.py -> build\lib.win-amd64-cpython-311\wordcloud copying wordcloud\tokenization.py -> build\lib.win-amd64-cpython-311\wordcloud copying wordcloud\wordcloud.py -> build\lib.win-amd64-cpython-311\wordcloud copying wordcloud\wordcloud_cli.py -> build\lib.win-amd64-cpython-311\wordcloud copying wordcloud_version.py -> build\lib.win-amd64-cpython-311\wordcloud copying wordcloud__init.py -> build\lib.win-amd64-cpython-311\wordcloud copying wordcloud\main__.py -> build\lib.win-amd64-cpython-311\wordcloud copying wordcloud\stopwords -> build\lib.win-amd64-cpython-311\wordcloud copying wordcloud\DroidSansMono.ttf -> build\lib.win-amd64-cpython-311\wordcloud UPDATING build\lib.win-amd64-cpython-311\wordcloud/_version.py set build\lib.win-amd64-cpython-311\wordcloud/_version.py to '1.8.2.2' running build_ext building 'wordcloud.query_integral_image' extension creating build\temp.win-amd64-cpython-311 creating build\temp.win-amd64-cpython-311\Release creating build\temp.win-amd64-cpython-311\Release\wordcloud d:\microsoft\visual_studio\2022\BuildTools\VC\Tools\MSVC\14.34.31933\bin\HostX86\x64\cl.exe /c /nologo /O2 /W3 /GL /DNDEBUG /MD -ID:\python\include -ID:\python\Include -Id:\microsoft\visual_studio\2022\BuildTools\VC\Tools\MSVC\14.34.31933\include -Id:\microsoft\visual_studio\2022\BuildTools\VC\Auxiliary\VS\include "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\cppwinrt" /Tcwordcloud/query_integral_image.c /Fobuild\temp.win-amd64-cpython-311\Release\wordcloud/query_integral_image.obj query_integral_image.c wordcloud/query_integral_image.c(196): fatal error C1083: Cannot open include file: 'longintrepr.h': No such file or directory error: command 'd:\microsoft\visual_studio\2022\BuildTools\VC\Tools\MSVC\14.34.31933\bin\HostX86\x64\cl.exe' failed with exit code 2 [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for wordcloud Running setup.py clean for wordcloud Failed to build wordcloud Installing collected packages: wordcloud 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 ╰─> [28 lines of output] running install D:\python\Lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. warnings.warn( running build running build_py creating build creating build\lib.win-amd64-cpython-311 creating build\lib.win-amd64-cpython-311\wordcloud copying wordcloud\color_from_image.py -> build\lib.win-amd64-cpython-311\wordcloud copying wordcloud\tokenization.py -> build\lib.win-amd64-cpython-311\wordcloud copying wordcloud\wordcloud.py -> build\lib.win-amd64-cpython-311\wordcloud copying wordcloud\wordcloud_cli.py -> build\lib.win-amd64-cpython-311\wordcloud copying wordcloud_version.py -> build\lib.win-amd64-cpython-311\wordcloud copying wordcloud__init.py -> build\lib.win-amd64-cpython-311\wordcloud copying wordcloud\main__.py -> build\lib.win-amd64-cpython-311\wordcloud copying wordcloud\stopwords -> build\lib.win-amd64-cpython-311\wordcloud copying wordcloud\DroidSansMono.ttf -> build\lib.win-amd64-cpython-311\wordcloud UPDATING build\lib.win-amd64-cpython-311\wordcloud/_version.py set build\lib.win-amd64-cpython-311\wordcloud/_version.py to '1.8.2.2' running build_ext building 'wordcloud.query_integral_image' extension creating build\temp.win-amd64-cpython-311 creating build\temp.win-amd64-cpython-311\Release creating build\temp.win-amd64-cpython-311\Release\wordcloud d:\microsoft\visual_studio\2022\BuildTools\VC\Tools\MSVC\14.34.31933\bin\HostX86\x64\cl.exe /c /nologo /O2 /W3 /GL /DNDEBUG /MD -ID:\python\include -ID:\python\Include -Id:\microsoft\visual_studio\2022\BuildTools\VC\Tools\MSVC\14.34.31933\include -Id:\microsoft\visual_studio\2022\BuildTools\VC\Auxiliary\VS\include "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\cppwinrt" /Tcwordcloud/query_integral_image.c /Fobuild\temp.win-amd64-cpython-311\Release\wordcloud/query_integral_image.obj query_integral_image.c wordcloud/query_integral_image.c(196): fatal error C1083: Cannot open include file: 'longintrepr.h': No such file or directory error: command 'd:\microsoft\visual_studio\2022\BuildTools\VC\Tools\MSVC\14.34.31933\bin\HostX86\x64\cl.exe' failed with exit code 2 [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.

muhammedfurkan commented 1 year ago

same here

lazarust commented 1 year ago

I am also running into this

joeperpetua commented 1 year ago

+1

Muhammadyusuf96 commented 1 year ago

Same on Win10x64, Python3.11.1

hermione0402 commented 1 year ago

same on MacOS Monterey12.3.1,Python3.11

mrfryfish commented 1 year ago

I'm receiving the same error message. As a workaround, I rolled back to 3.10, but it would be great to have this corrected for 3.11

pg1671 commented 1 year ago

Any update on wheels for 3.11? At 3.11.1 and want to upgrade for the performance boost and wordcloud is the only package that won't install.

Rajdave69 commented 1 year ago

Same on Ubuntu server 20.04, python 3.11

dlukes commented 1 year ago

I think this is fixed in master (https://github.com/amueller/word_cloud/pull/697), it just hasn't made it into a release yet.

park-jay commented 1 year ago

I cannot install it on M1 Python 3.11 either.

mratanusarkar commented 1 year ago

Same issue with python 3.11, windows 10 system. pip install is failing. Waiting for new release with fix for this issue.

WilliamSoCreat commented 1 year ago

+1

dataymeric commented 1 year ago

As per #708: wordcloud does work on Python 3.11 but it hasn't made to release yet. For anyone struggling to install wordcloud on Python 3.11, this solution should work:

python -m pip install -e git+https://github.com/amueller/word_cloud#egg=wordcloud

If this command doesn't work for some reason, clone the repo and run pip install on the cloned repository.

As per the README, it requires a C compiler set up.

opcris commented 1 year ago

python -m pip install -e git+https://github.com/amueller/word_cloud#egg=wordcloud Thank you! Worked! (Microsoft Windows [Version 10.0.22621.1265], Python 3.11.1 (tags/v3.11.1:a7a450f, Dec 6 2022, 19:58:39) [MSC v.1934 64 bit (AMD64)] on win32)

MrNielson commented 1 year ago

The workaround works for the installation but importing WordCloud runs into this Error: from .query_integral_image import query_integral_image

Exception has occurred: ModuleNotFoundError No module named 'wordcloud.query_integral_image' File "/Users/##/###/###/word_cloud-1.5.0/wordcloud/wordcloud.py", line 25, in from .query_integral_image import query_integral_image '

When I check the path there is no .py named query_integral_image Bildschirm­foto 2023-03-24 um 14 47 31

changing the pyx to py does not work. Any idea how to fix the error?

amueller commented 1 year ago

Please try again, binaries for 3.11 should be available now.

amueller commented 1 year ago

required some more fixes, should be good now!