如何使用cxfreeze打包scrapy项目?

发布于 2024-09-25 00:12:29 字数 196 浏览 2 评论 0原文

我有一个 scrapy 项目,我想为使用 Windows 的客户将其全部打包在一起,而无需手动为它们安装依赖项。我遇到了 cxfreeze,但我不太确定它如何与 scrapy 项目一起工作。

我想我会制作某种界面并使用“from scrapy.cmdline importexecute”运行scrapy爬虫,但我不确定。

预先感谢您的任何帮助。

I have a scrapy project that I would like to package all together for a customer using windows without having to manually install dependencies for them. I came across cxfreeze, but I'm not quite sure how it would work with a scrapy project.

I'm thinking I would make some sort of interface and run the scrapy crawler with 'from scrapy.cmdline import execute', but I'm not sure.

Thanks in advance for any help.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

装纯掩盖桑 2024-10-02 00:12:29

尝试一下 py2exe。它运行良好,您可以将所有代码捆绑在一个 exe 中。

我建议您排除未使用的软件包以减少 exe 大小(请参阅其网站上的 py2exe 示例)

UDATE
按照建议也尝试一下

GUI2Exe 是图形用户
所有的接口前端
“可执行构建器”可用于
Python 编程语言。它
可以用来构建独立的
Windows 可执行文件、Linux
应用程序和 Mac OS 应用程序
捆绑包和插件从
Python 脚本。

Try out py2exe. It works well, you can bundle all the code in one exe.

I suggest you to exclude unused packages to reduce exe size (see py2exe examples on its site)

UDATE
As suggested try also

GUI2Exe is a Graphical User
Interface frontend to all the
"executable builders" available for
the Python programming language. It
can be used to build standalone
Windows executables, Linux
applications and Mac OS application
bundles and plugins starting from
Python scripts.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文