使用nltk时,在将python文件导出到exe时遇到问题

时间:2020-08-17 15:57:50

标签: python nltk exe pyinstaller

我对编码很陌生,在使用nltk的代码中将python文件导出到.exe文件时遇到了问题。

这是我的代码。

from PyDictionary import PyDictionary
from nltk.corpus import words
import random
import pyautogui
import time

dictionary=PyDictionary()

time.sleep(1)
while True:
    ran = random.randint(1, 236736)
    word_list = words.words()
    correct_word = (dictionary.meaning(word_list[ran]))
    propper_formating = "%s meaning: %s " % (word_list[ran], correct_word)
    no_none = propper_formating.count("None")
    if no_none == 0:
        pyautogui.write(propper_formating)
        pyautogui.press("enter")
        quit()

有人知道发生了什么吗?

0 个答案:

没有答案
相关问题