我正在尝试使用py2exe
从python脚本创建一个独立的可执行文件。该脚本使用Google的speech_recognition
模块。我尝试了很多在google搜索中找到的东西,但似乎没有什么能解决这个问题(尝试导入setup.py
文件中的subprocess
,包括我的脚本可能使用的每个模块,等等)。你知道吗
有什么想法吗?(注意:我不想从py2exe
改成pyinstaller
,因为它在我的脚本中需要的另一个模块中有一个未解决的bug)。这就是我在执行过程中的某个时刻之后得到的结果:
Traceback (most recent call last): File "core_v_0.1.py", line 210, in <module>
search_for_series()
File "core_v_0.1.py", line 111, in search_for_series
answer=user_speech_recognition()
File "core_v_0.1.py", line 147, in user_speech_recognition
user_said_=r.recognize_google(audio)
File "speech_recognition\__init__.pyc", line 608, in recognize_g
File "speech_recognition\__init__.pyc", line 351, in get_flac_da
File "subprocess.pyc", line 710, in __init__
File "subprocess.pyc", line 958, in _execute_child
WindowsError: [Error 2] The system cannot find the file specified
我猜它是想运行} param 到
flac.exe
来压缩音频 而且该exe不是由py2exe
绑定的。强制包含任意文件 在中使用^{setup
设置.py像这样:我还没有玩过googlespeach,所以必须检查路径,例如模块希望找到的地方flac.exe文件. 你知道吗
相关问题 更多 >
编程相关推荐