2016-03-10 43 views
6

接受以下運行Py2Exe時:Py2Exe錯誤:缺少運行py3.5共贏 - amd64.exe

running py2exe 

12 missing Modules 
------------------ 
? Image        imported from openpyxl.drawing.image 
? PIL._imagingagg      imported from PIL.ImageDraw 
? PyQt5        imported from PIL.ImageQt 
? PySide        imported from PIL.ImageQt 
? _abcoll        imported from openpyxl.compat.odict 
? _imaging_gif      imported from PIL.GifImagePlugin 
? _util        imported from PIL.ImageCms 
? cffi        imported from PIL.Image, PIL.PyAccess 
? lxml        imported from openpyxl.xml, openpyxl.xml.functions 
? openpyxl.tests      imported from openpyxl.reader.excel 
? readline       imported from cmd, code, pdb 
? tkinter        imported from PIL.ImageTk 
Building 'dist\dlpreport.exe'. 
error: [Errno 2] No such file or directory: 'C:\\Python\\lib\\site-packages\\py2exe\\run-py3.5-win-amd64.exe' 

我假設這是因爲Py2Exe目前建成的Python 3.4,但我想知道如果有一種方法可以強制它(不安裝另一個Python版本)。

+0

參見:http://stackoverflow.com/questions/32963057/is-there-a-py2exe-version-thats-compatible-with-python-3-5 – Damian

回答

1

如果這些模塊對您的應用程序沒有任何用處,那麼只需在您的安裝文件中添加排除命令即可。它會自動排除這些模塊並停止發送警告。

setup(
    options={'py2exe':{'excludes':['Image','PIL._imagingagg','PyQt4', 
    'PyQt5','_abcoll','_imaging_gif','_util','cffi','lxml','openpyxl.tests', 
    'readline','tkinter']}}, 
    ) 
+0

不幸的是那幾個在使用我的應用程序。 – user987654321