1
我已经安装了python 2.6和新版本的py2exe。Python - py2exe - DeprecationWarning
hello.py
print "Hello from py2exe"
setup.py
from distutils.core import setup
import py2exe
setup(
# The first three parameters are not required, if at least a
# 'version' is given, then a versioninfo resource is built from
# them and added to the executables.
version = "0.5.0",
description = "py2exe sample script",
name = "py2exe samples",
# targets to build
windows = ["test_wx.py"],
console = ["hello.py"],
)
,我已经试过这在控制台
python setup.py install
但我收到此错误信息
D:\Python26\lib\site-packages\py2exe\build_exe.py:16: DeprecationWarning: the sets module is deprecated
import sets
running install
running build
running install_egg_info
Removing D:\Python26\Lib\site-packages\py2exe_samples-0.5.0-py2.6.egg-info
Writing D:\Python26\Lib\site-packages\py2exe_samples-0.5.0-py2.6.egg-info
我错了什么?我该如何解决它?
1.当你想建立一个EXE文件时,为什么要执行`python setup.py install`? 2.警告有什么问题 - sets模块*被弃用,因为它被内建的`set`和`frozenset`类型取代。似乎py2exe仍然在某处使用它。 – AndiDog 2011-01-24 08:20:13
是的,当然!你是对的,我正确的类型错误的命令,我必须使用`python setup.py py2exe` – Meloun 2011-01-24 08:25:16