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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
v-ramalt
Employee
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
Employee
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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

Top Solution Authors