简体   繁体   中英

Python - py2exe - DeprecationWarning

I've installed python 2.6 and new version of py2exe.

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"],
    )

and I've tried this in console

python setup.py install

but I get this error message

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

What did I wrong? how can I fix it?

Its not an error, its just a warning about a deprecated class; in this case the sets module is deprecated and the new code should use built-in set class now.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM