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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

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
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors
Top Kudoed Authors