gpt4 book ai didi

Python - py2exe - 弃用警告

转载 作者:太空宇宙 更新时间:2023-11-04 11:01:38 25 4
gpt4 key购买 nike

我已经安装了 python 2.6 和新版本的 py2exe。

你好.py

print "Hello from py2exe"

设置.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

我做错了什么?我该如何解决?

最佳答案

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

关于Python - py2exe - 弃用警告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4779887/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com