【Python】[分发软件] cx_Freeze

平台

Win10
Python 3.6.1

选择工具

现在主流的python打包工具就三个
1. py2exe
2. pyinstaller
3. cx_Freeze

因为我是用的Python 3.6.1
这货只有cx_Freeze支持
于是就用cx_Freeze辣!

安装

直接pip install cx_Freeze即可

如果你想直接在命令行里直接用(一般是会这么用的)
那你还需要进入到Python的安装目录下的Scripts文件夹
比如我的系统在C:\Users\dell\AppData\Local\Programs\Python\Python36\Scripts\
然后执行python cxfreeze-postinstall

使用

建议参考其官方文档:https://cx-freeze.readthedocs.io/en/latest/overview.html

值得注意的有以下三点:
1. icon只支持.ico文件,可以用这个网站在线转:https://converticon.com/
2. 如果想去掉黑框,加上base = "Win32GUI"
3. 64位的cx_Freeze只能生成64位可执行文件。如要生成32位的,只能将python和cx_Freeze都装成32位才行

3 thoughts to “【Python】[分发软件] cx_Freeze”

  1. You will forever find on line solutios that advertise
    a whole lot and subsequently drop flat however, there is big hopes regarding the Site –
    Bldz solution. Thus, gemstone buyiny and selling can be promising in gemstone forums.
    But the methods forecasted throuth the expert ensure
    to measure its level by analyzing the on-line conversion rate off sales and thee increase of visitors in your website.

  2. I would like to thank you for the efforts you’ve put in penning this blog. I’m hoping to check out the same high-grade blog posts by you in the future as well. In fact, your creative writing abilities has encouraged me to get my own, personal blog now 😉

发表评论

电子邮件地址不会被公开。 必填项已用*标注