Open talha2k opened 1 year ago
I switched from jupyter notebook on my windows 10 machine to google collab enviornment and wordcloud worked there as expected.
I would request to keep this issue open until a resolution is found.
Dear friend, I use this code solve it
pip install --upgrade pip
pip install --upgrade Pillow
Linux, anaconda
@StarDxxx What python version are you using? This is not working for me.
Hey folks, has anyone solved this issue? I got the same error
Had a similar issue (and fix) with an error: AttributeError: 'TransposedFont' object has no attribute 'getbbox'
I saw the pip install of wordcloud included older versions of numpy and Pillow. Just pip installing numpy and pillow above wordcloud (and matplotlib) fixed the issue for me.
edit: working on a databricks cluster
pip install --upgrade Pillow
Did the trick for me!
I have the same issue, even when I tried the trick of upgrade pip and Pillow
Facing the same issue as well and updating PIP and Pillow did not help.
Facing the same issue as well and updating pip and Pillow did not help. Running Google Colab on a Mac.
Dear friend, I use this code solve it
pip install --upgrade pip pip install --upgrade Pillow
Linux, anaconda
Running these 2 lines solved the same 'TrueType font+' problem for another package - ydata-profiling
Using Python 3.6, re-installed wordcloud 1.8.0 (pip install wordcloud==1.8.0) , issue fixed. Latest version of WordCloud does not support Python3.6 as per official docs.
yeah, I'm very appreciate for your indication, which helps me a lot and gives me a direction actually. Along this way, I upgrade my Pillow, the course follows: firstly, I get a error when I directly use the code
pip install --upgrade Pillow
, as follows:raise ValueError("Only supported for TrueType fonts") ValueError: Only supported for TrueType fonts
; which definitely make me crazy. finally I try other versions with the codepip3 install --upgrade Pillow==9.2.0
(you can usepip3 install --upgrade Pillow==
to see what version you can use )that beyond mine but bellow the latest. many times later, I found my issue not existed anymore!
pip install --upgrade Pillow
This might work and has worked for me while using ydata profling , etc
Can anyone give a solution for VSC on this issue
i tried the pip and pillow upgrade nothing seems working. i am using python 3.9 version i am still getting the error ;i dont think its a code bug issue AttributeError: 'TransposedFont' object has no attribute 'getbbox'
In my case installing the suggested lines worked (after restarting Jupyter Notebook)
pip install --upgrade pip
pip install --upgrade Pillow
I'm a windows user (Windows 10). This worked for me. But I had to restart Jupyter notebooks after installing both of them
I tried everything in this comment thread and still facing the same issue: pip install --upgrade pip, pip install --upgrade Pillow, re-installed wordcloud 1.8.0 (pip install wordcloud==1.8.0), Shut down my kernel and restarted the notebook again.
I am using Python 3.8.8 on MacOS. If anyone can help me, it would be appreciated!
My two cents in your case would be to try to execute the command in the cmd window (accessing it as an administrator instead of sudo). It might work (execute all that you did before, except maybe reinstalling wordcloud, but then I don't know). Good luck.
Ran into the same issue, could not fix with upgrading pip or Pillow. Luckily I am using Conda, and created a new environment, then re-installed it now it works. My guess is a conflict on the environment I was already working on.
Below are the commands I used in order to get it working. (Note: some may not be needed for this to work):
conda create --name dataScience python=3.10
conda activate dataScience
conda install matplotlib
conda install wordcloud
I followed the below instructions, and I got blocked after deinstalling datasSCience.
When trying to reinstall, executing conda activate dataScience I am told that I don’t have openSSL.
When downloading openSSL, you are prompted to make a donation of $10 but still get the error message that it is not installed.
After two unsuccessful attempts (20$) I am no longer willing to try this solution and exhort for solutions not involving financial transactions tied to them.
@.***
@.***
From: omar908 @.> Sent: Wednesday, August 16, 2023 3:30 PM To: amueller/word_cloud @.> Cc: bernardin moussa @.>; Comment @.> Subject: Re: [amueller/word_cloud] ValueError: Only supported for TrueTypefonts (Issue #729)
[Boxbe]https://www.boxbe.com/overviewomar908 @.**@.>) is not on your Guest Listhttps://www.boxbe.com/approved-list?tc_serial=59350397447&tc_rand=233313312&utm_source=stf&utm_medium=email&utm_campaign=ANNO_MWTP&utm_content=001&&key=MISam%2FTi%2Fm7iTvD1A7vNnY8GjEyTYbK%2BFoFvB%2BeVUPg%3D&token=x7N9OhXzynwCs6dPVaRUFzNwUtsFFfPZzgeZSZF8%2BcQ1HuXZqKLtdevjVuG1Q%2BpU | Approve senderhttps://www.boxbe.com/anno?tc_serial=59350397447&tc_rand=233313312&utm_source=stf&utm_medium=email&utm_campaign=ANNO_MWTP&utm_content=001&&key=MISam%2FTi%2Fm7iTvD1A7vNnY8GjEyTYbK%2BFoFvB%2BeVUPg%3D&token=x7N9OhXzynwCs6dPVaRUFzNwUtsFFfPZzgeZSZF8%2BcQ1HuXZqKLtdevjVuG1Q%2BpU | Approve domainhttps://www.boxbe.com/anno?tc_serial=59350397447&tc_rand=233313312&utm_source=stf&utm_medium=email&utm_campaign=ANNO_MWTP&utm_content=001&&dom&key=MISam%2FTi%2Fm7iTvD1A7vNnY8GjEyTYbK%2BFoFvB%2BeVUPg%3D&token=x7N9OhXzynwCs6dPVaRUFzNwUtsFFfPZzgeZSZF8%2BcQ1HuXZqKLtdevjVuG1Q%2BpU
Ran into the same issue, could not fix with upgrading pip or Pillow. Luckily I am using Conda, and created a new environment, then re-installed it now it works. My guess is a conflict on the environment I was already working on.
Below are the commands I used in order to get it working. (Note: some may not be needed for this to work):
conda create --name dataScience python=3.10
conda activate dataScience
conda install matplotlib
conda install wordcloud
— Reply to this email directly, view it on GitHubhttps://github.com/amueller/word_cloud/issues/729#issuecomment-1681160970, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AJDFDZEK2UI6E2HPNMVJKZDXVUNRVANCNFSM6AAAAAAYJRUCB4. You are receiving this because you commented.Message ID: @.**@.>>
I strongly discourage this avenue. I tried it and after uninstalling dataScience and trying to reinstall it again, I got an error message telling me that I needed openSSL. When downloading openSSL from the net, the last step asks you to make a donation in order to be able to finish the setup. Which I did (twice) and it is still not working.
@B-din2018 openSSL is free and should not be requiring any sort of payment. I am not sure where you are obtaining the installer from, but I suggest installing openSSL through conda if you are having issues installing it manually.
conda install -c anaconda openssl
I used the command inside Jupyter this time and then tried to activate dataScience using the console again. No rejection, so I would like to think it worked
@B-din2018 I think you might have a misunderstanding on what the command conda activate dataScience
actual does.
On the latest screenshot you can see in paranthesis to the left showing (dataScience)
this means you already have activated the dataScience
environment.
Switching environment does not create the issue you are facing, because it is just switching context within your local files.
The error you are getting with OpenSSL is when you try to install packages with conda
. This still looks to be the case based upon your screenshot.
I recommend verifying if you have OpenSSL installed somewhere in your PC, and it could be that you just need to add it to your System Environments
so the command line can utilize it.
Or you may need to install it manually again, but please remember OpenSSL is Free and should not require a payment. If you see it requesting donations, those might be optional and can be unchecked. IF it does not let you continue without donation/payment you might be using an incorrect installer, and I suggest stopping then and there and looking for a more legitimate one.
@@.***> Would you be open to a joint session online? I am at 85% completion of my course and must absolutely jump over these last three hurdles:
Create (testing) classes from my samples | Get my confusion Matrix | Get my Tensorflow back working ?
I would be grateful if it is a possibility, if not I will also fully understand.
From: omar908 @.> Sent: Wednesday, August 23, 2023 3:39 PM To: amueller/word_cloud @.> Cc: Bernardin Moussa @.>; Mention @.> Subject: Re: [amueller/word_cloud] ValueError: Only supported for TrueType fonts (Issue #729)
@B-din2018https://github.com/B-din2018 I think you might have a misunderstanding on what the command conda activate dataScience actual does.
On the latest screenshot you can see in paranthesis to the left showing (dataScience) this means you already have activated the dataScience environment.
Switching environment does not create the issue you are facing, because it is just switching context within your local files.
The error you are getting with OpenSSL is when you try to install packages with conda. This still looks to be the case based upon your screenshot.
I recommend verifying if you have OpenSSL installed somewhere in your PC, and it could be that you just need to add it to your System Environments so the command line can utilize it.
Or you may need to install it manually again, but please remember OpenSSL is Free and should not require a payment. If you see it requesting donations, those might be optional and should be able to be unchecked. IF it does not let you continue without donation/payment you might be using an incorrect installer, and I suggest stopping then and there and looking for a more legitimate one.
- Reply to this email directly, view it on GitHubhttps://github.com/amueller/word_cloud/issues/729#issuecomment-1690532874, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AJDFDZFRXW7KTD2RYN7X7QDXWZL4DANCNFSM6AAAAAAYJRUCB4. You are receiving this because you were mentioned.Message ID: @.**@.>>
i am facing same issue
@B-din2018 I might have some time during this week, during the day to try a few things quickly. But I suggest you try a few things beforehand so we know what has already been tried.
@@.> Would you be open to a joint session online? I am at 85% completion of my course and must absolutely jump over these last three hurdles: Create (testing) classes from my samples | Get my confusion Matrix | Get my Tensorflow back working ? I would be grateful if it is a possibility, if not I will also fully understand. From: omar908 @.> Sent: Wednesday, August 23, 2023 3:39 PM To: amueller/word_cloud @.> Cc: Bernardin Moussa @.>; Mention @.> Subject: Re: [amueller/word_cloud] ValueError: Only supported for TrueType fonts (Issue #729) @B-din2018https://github.com/B-din2018 I think you might have a misunderstanding on what the command conda activate dataScience actual does. On the latest screenshot you can see in paranthesis to the left showing (dataScience) this means you already have activated the dataScience environment. Switching environment does not create the issue you are facing, because it is just switching context within your local files. The error you are getting with OpenSSL is when you try to install packages with conda. This still looks to be the case based upon your screenshot. I recommend verifying if you have OpenSSL installed somewhere in your PC, and it could be that you just need to add it to your System Environments so the command line can utilize it. Or you may need to install it manually again, but please remember OpenSSL is Free and should not require a payment. If you see it requesting donations, those might be optional and should be able to be unchecked. IF it does not let you continue without donation/payment you might be using an incorrect installer, and I suggest stopping then and there and looking for a more legitimate one. - Reply to this email directly, view it on GitHub<#729 (comment)>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AJDFDZFRXW7KTD2RYN7X7QDXWZL4DANCNFSM6AAAAAAYJRUCB4. You are receiving this because you were mentioned.Message ID: @*.**@*.***>>
Those who are facing issue in pip install --upgrade Pillow
, use the command pip install --upgrade Pillow --user
. This will install Pillow in your user's Python environment without requiring administrator privileges.
I am facing the same error on Red Hat Enterprise 7.9, Python 3.6. Upgrading pip and pillow did not work
I was getting the same ValueError: Only supported for TrueType fonts. (I was using a Juypter Notebook on my Windows laptop and using wordcloud with matplotlib.). I learned Matplotlib has a script called font_manager in which for Windows, it looks for fonts in 2 places:
I opened run and did %AppData% and drilled to the Roaming font directory and I found the AppData/Roaming/Microsoft/Windows/Fonts directory had no font files in it. I just copied the arial.ttf font via cmd to the roaming font directory and it seems to have solved my error.
Not sure what caused the font_manager to look under roaming but it ended up being a quick and easy fix.
I tried everything in this comment thread and still facing the same issue: pip install --upgrade pip, pip install --upgrade Pillow, re-installed wordcloud 1.8.0 (pip install wordcloud==1.8.0), Shut down my kernel and restarted the notebook again.
I am using Python 3.8.8 on MacOS. If anyone can help me, it would be appreciated!
it work for me
Please note: This issue is happening only in windows 10 enviornment.
Above code when ran in jupyter notebook on windows enviornment produces the following error:
ValueError: Only supported for TrueType fonts
As others suggested to upgrade pillow, this doesn't solve the problem on windows. Pillow version is 9.5.0, python- 3.10.0. Anaconda Environment Restarted. Windows Restarted. Double checked that font file exists and is font.ttf. Still the problem is not solved.