Python论坛  - 讨论区

标题:求教py2exe打包时的问题

陈

2015年01月28日 星期三 14:24

#setup.py

#coding:utf8

from distutils.core import setup
import py2exe
import sys


includes = ['appmain']

options = {"py2exe":
           {
            "includes":includes,
            "bundle_files":1
            }
          }
setup(
      version = "0.1.0",
      name = "",
      options = options,
      console = ['startmaster.py'],
      data_files = ['appmain.py',
                    'config.json',
                   '..\\..\\Document\\ServerConfig\\config.config',
                   '..\\..\\Document\\ServerConfig\\randName.config',
                   ]
      )

使用py2exe打包时,出现以下问题:

copying E:\Python27\lib\site-packages\win32\win32event.pyd -> D:\LYGame\trunk\Se
rver\lymmServer\build\bdist.win32\winexe\collect-2.7
copying E:\Python27\lib\site-packages\win32\win32file.pyd -> D:\LYGame\trunk\Ser
ver\lymmServer\build\bdist.win32\winexe\collect-2.7
copying E:\Python27\lib\site-packages\win32\win32gui.pyd -> D:\LYGame\trunk\Serv
er\lymmServer\build\bdist.win32\winexe\collect-2.7
copying E:\Python27\lib\site-packages\win32\win32pipe.pyd -> D:\LYGame\trunk\Ser
ver\lymmServer\build\bdist.win32\winexe\collect-2.7
copying E:\Python27\lib\site-packages\win32\win32process.pyd -> D:\LYGame\trunk\
Server\lymmServer\build\bdist.win32\winexe\collect-2.7
copying E:\Python27\lib\site-packages\win32\win32security.pyd -> D:\LYGame\trunk
\Server\lymmServer\build\bdist.win32\winexe\collect-2.7
copying E:\Python27\lib\site-packages\zope.interface-4.1.1-py2.7-win32.egg\zope\
interface\_zope_interface_coptimizations.pyd -> D:\LYGame\trunk\Server\lymmServe
r\build\bdist.win32\winexe\collect-2.7\zope\interface
*** copy dlls ***
copying C:\WINDOWS\system32\pywintypes27.dll -> D:\LYGame\trunk\Server\lymmServe
r\build\bdist.win32\winexe\collect-2.7
copying C:\WINDOWS\system32\python27.dll -> D:\LYGame\trunk\Server\lymmServer\bu
ild\bdist.win32\winexe\bundle-2.7
setting sys.winver for 'D:\LYGame\trunk\Server\lymmServer\build\bdist.win32\wine
xe\bundle-2.7\python27.dll' to 'py2exe'
error: [Error 5] : 'D:\\LYGame\\trunk\\Server\\lymmServer\\build\\bdist.win32\\w
inexe\\bundle-2.7\\python27.dll'

D:\LYGame\trunk\Server\lymmServer>

C:/Windows/system32下确实有python27.dll,不明白为什么在此处会出现错误??

望高手指教

 

如下红色区域有误,请重新填写。

    你的回复:

    请 登录 后回复。还没有在Zeuux哲思注册吗?现在 注册 !

    Zeuux © 2024

    京ICP备05028076号