[英]py2exe - “The following modules appear to be missing”
第一次使用stackoverflow,所以請輕松一些。 我以前在舊計算機上使用py2exe,它工作正常。 不幸的是,當嘗試在我的新exe上使用它時。 文件只是不起作用。 嘗試轉換.py文件時出現這些錯誤。
我的設置.py
from distutils.core import setup
import py2exe
setup(windows=['Test.py'])
我的Test.py轉換為exe。
def Test():
print 'TEST'
Test()
我收到的錯誤:
The following modules appear to be missing
['IronPythonConsole', 'System', 'System.Windows.Forms.Clipboard', '_scproxy', 'c
lr', 'console', 'modes.editingmodes', 'pyreadline.keysyms.make_KeyPress', 'pyrea
dline.keysyms.make_KeyPress_from_keydescr', 'pyreadline.keysyms.make_keyinfo', '
pyreadline.keysyms.make_keysym', 'startup']
*** binary dependencies ***
Your executable(s) also depend on these dlls which are not included,
you may or may not need to distribute them.
Make sure you have the license if you distribute any of them, and
make sure you don't distribute files belonging to the operating system.
OLEAUT32.dll - C:\WINDOWS\system32\OLEAUT32.dll
USER32.dll - C:\WINDOWS\system32\USER32.dll
SHELL32.dll - C:\WINDOWS\system32\SHELL32.dll
KERNEL32.dll - C:\WINDOWS\system32\KERNEL32.dll
ADVAPI32.dll - C:\WINDOWS\system32\ADVAPI32.dll
WS2_32.dll - C:\WINDOWS\system32\WS2_32.dll
GDI32.dll - C:\WINDOWS\system32\GDI32.dll
VERSION.dll - C:\WINDOWS\system32\VERSION.dll
ole32.dll - C:\WINDOWS\system32\ole32.dll
有任何想法嗎? 我只是放棄了在線尋找,因為我似乎無法找到問題的任何答案。 非常感謝您的幫助。
我認為問題在於您在控制台應用程序中使用的是window選項而不是console選項。 有關py2exe的任何其他問題,請參考此鏈接 。
使用以下代碼構建您的.exe:
from distutils.core import setup
import py2exe
setup(console=['Test.py'])
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.