【发布时间】:2017-12-27 07:09:40
【问题描述】:
我正在尝试使用 pyinstaller 创建一个 .exe 文件并执行它
它没有从中获取任何结果
b = TextBlob(ar)
score = b.sentiment.polarity
在控制台执行时返回正确的值 但使用 .exe 执行时返回 0
def start_dmo():
print ("Importing all the required packages...")
from textblob import TextBlob
input ("press enter to continue")
print("All Necessary Packages imported")
input("press enter to continue")
ar="I cant be more happy with this"
print(ar)
b = TextBlob (ar)
score = b.sentiment.polarity
print (b.sentiment.polarity)
input("press enter to continue")
score = round (score, 2)
if score > 0.0:
senti = "Positive"
elif score < 0.0:
senti = "Negative"
else:
senti = "Neutral"
print("Score"+str(score)+"sentiment"+senti)
input("press enter to continue")
start_dmo()
this is the output when the above code is executed on console
【问题讨论】:
-
@user772401 你能帮帮我吗?谢谢
标签: hook pyinstaller textblob