首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Python - py2exe - DeprecationWarning

Python - py2exe - DeprecationWarning
EN

Stack Overflow用户
提问于 2011-01-24 16:14:42
回答 1查看 1.9K关注 0票数 1

我已经安装了Python2.6和新版本的py2exe。

hello.py

代码语言:javascript
复制
print "Hello from py2exe"

setup.py

代码语言:javascript
复制
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"],
    )

我已经在控制台中尝试过了

代码语言:javascript
复制
python setup.py install

但是我得到了这个错误信息

代码语言:javascript
复制
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

我做错了什么?我怎么才能修复它?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2011-01-24 16:18:31

这不是一个错误,它只是一个关于弃用类的警告;在这种情况下,sets模块是弃用的,新代码现在应该使用内置的set类。

票数 4
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/4779887

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档