Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
v-ramalt
Microsoft Employee
Microsoft Employee

Pyhon wod clud script woking in Power BI Desktop but not working in Service

Issue: we created word cloud using python(below libraries) and able run in Power BI desktop but same not working Power BI Service, getting error when we published into service, please resolve the issue.
 
Libraries which we used in Python script :
from os import path
from wordcloud import WordCloud, STOPWORDS
from nltk.corpus import stopwords
import matplotlib.pyplot as plt
import pandas as pd
import re
from sklearn.feature_extraction.text import TfidfVectorizer,CountVectorizer
from collections import Counter
import numpy as np
from os import path
from PIL import Image
import numpy as np
from nltk import tokenize
from nltk.corpus import stopwords
from nltk.stem.snowball import SnowballStemmer
from nltk import pos_tag
from nltk.corpus import wordnet
from nltk.stem import WordNetLemmatizer
 
Getting below error in Power BI Cloud Service:
File "C:\Script\0.py", line 28, in <module> from wordcloud import WordCloud, STOPWORDS ModuleNotFoundError: No module named 'wordcloud'
Please try again later or contact support. If you contact support, please provide these details.
Activity IDbbd4b1dc-0721-4476-9cc0-205e7fae8d68
Request IDb076787c-af03-11aa-afe1-eac52fec4b2b
Correlation ID96433cd2-48ea-82db-7995-5866bf04acc3
TimeTue Mar 24 2020 18:16:50 GMT+0530 (India Standard Time)
Service version13.0.12816.165
Client version2003.4.020
Cluster URIhttps://df-msit-scus-redirect.analysis.windows.net/

4 REPLIES 4
v-ramalt
Microsoft Employee
Microsoft Employee

Issue: we created word cloud using python(below libraries) and able run in Power BI desktop but same not working Power BI Service, getting error when we published into service, please resolve the issue. 
Libraries which we used in Python script :
from os import path
from wordcloud import WordCloud, STOPWORDS
from nltk.corpus import stopwords
import matplotlib.pyplot as plt
import pandas as pd
import re
from sklearn.feature_extraction.text import TfidfVectorizer,CountVectorizer
from collections import Counter
import numpy as np
from os import path
from PIL import Image
import numpy as np
from nltk import tokenize
from nltk.corpus import stopwords
from nltk.stem.snowball import SnowballStemmer
from nltk import pos_tag
from nltk.corpus import wordnet
from nltk.stem import WordNetLemmatizer


Getting below error in Power BI Cloud Service:
File "C:\Script\0.py", line 28, in <module> from wordcloud import WordCloud, STOPWORDS ModuleNotFoundError: No module named 'wordcloud'
Please try again later or contact support. If you contact support, please provide these details.
Activity IDbbd4b1dc-0721-4476-9cc0-205e7fae8d68
Request IDb076787c-af03-11aa-afe1-eac52fec4b2b
Correlation ID96433cd2-48ea-82db-7995-5866bf04acc3
TimeTue Mar 24 2020 18:16:50 GMT+0530 (India Standard Time)
Service version13.0.12816.165
Client version2003.4.020
Cluster URIhttps://df-msit-scus-redirect.analysis.windows.net/

v-kelly-msft
Community Support
Community Support

Hi @v-ramalt ,

 

1.Execute the following to get the path to the executable:

 

import sys
print(sys.executable)

 

2.Take the path-to-the-executable from the above to execute the following:

 

<path-to-the-executable>/python -m pip install wordcloud

 

3.Try using latest version of worldcloud.

 

Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
 

 

 

Are you saying wordcloud package is supported by power bi service and this should work? 

When you install these packages on the desktop it's working. However, when you publish it doesn't work. so "nltk" is not supporting on power BI service?

Helpful resources

Announcements
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.