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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors