我想用py2exe將python腳本轉換爲Windows可執行文件。我沒有錯過MSVCP90.dll和Feiwings.py(我用於轉換的文件)和setup.py在相同的路徑下。在命令窗口中做的那些事,一切正常,這裏的回溯的最後一行是:Py2exe不能將python腳本轉換爲Windows可執行文件
**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.
USER32.dll -C:\WINDOWS\system32\USER32.dll
SHELL32.dll -C:\WINDOWS\system32\SHELL32.dll
ADVAPI32.dll -C:\WINDOWS\system32\ADVAPI32.dll
WS2_32.dll -C:\WINDOWS\system32\WS2_32.dll
GDI32.dll -C:\WINDOWS\system32\GDI32.dll
KERNEL32.dll -C:\WINDOWS\system32\KERNEL32.dll
的setup.py有這樣的內容:
from distutils.core import setup
import py2exe
setup(console=['D:\python\Feiwings.py'])
當我CD的路徑dist目錄,它有一個錯誤。
Traceback (most recent call last):
File "Feiwings.py", line 2, in <module>
File "PySide\__init__.pyc", line 45, in <module>
File "PySide\__init__.pyc", line 43, in _setupQtDirectories
UnboundLocalError: local variable 'path' referenced before assignment
在此先感謝!