第一次使用stackoverflow所以請容易。我之前在我的舊電腦上使用過py2exe,並且工作正常。不幸的是,當試圖使用它在我的新的EXE。文件不起作用。嘗試轉換.py文件時出現這些錯誤。py2exe - 「以下模塊似乎缺少」
我設置的.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
任何想法?我剛剛放棄在網上尋找,因爲我似乎找不到任何問題的答案。我會很感激一些幫助。
我只是運行相同的代碼,它沒有給任何缺少模塊錯誤。什麼嘗試重新安裝py2exe。 – TheCreator232