冻结 Python 代码时缺少多处理模块
我正在使用 cx_Freeze 冻结我的 Python 代码,以便我可以将其作为可执行文件分发到 Windows 系统上。它工作正常,但缺少一些模块。我在我的项目中使用了一些开源库,例如 BeautifulSoup 和 Periscope。他们使用一些库来实现向后兼容性,我不需要包含这些库,因为 Python 2.6 有它们。问题是第三个导入 - multiprocessing._multiprocessing。谁能告诉我需要安装什么才能解决这个问题? mutiprocessing 模块似乎与 Python 捆绑在一起,那么是什么导致了这个错误呢?
Missing modules:
? cjkcodecs.aliases imported from BeautifulSoup.BeautifulSoup
? iconv_codec imported from BeautifulSoup.BeautifulSoup
? multiprocessing._multiprocessing imported from multiprocessing.forking
? xdg.BaseDirectory imported from periscope.periscope
有什么帮助吗?
谢谢你们!
I'm using cx_Freeze to freeze my Python code so I can distribute it as executable on Windows systems. It works fine but it's missing a few modules. I use some open-source libraries in my project e.g. BeautifulSoup and Periscope. They use some libraries for backward compatibility which i don't need to include as Python 2.6 has them. The problem is the third import — multiprocessing._multiprocessing. Can anyone tell me what I need to install in order to fix this? The mutiprocessing module seems to come bundled with Python so what's causing this error?
Missing modules:
? cjkcodecs.aliases imported from BeautifulSoup.BeautifulSoup
? iconv_codec imported from BeautifulSoup.BeautifulSoup
? multiprocessing._multiprocessing imported from multiprocessing.forking
? xdg.BaseDirectory imported from periscope.periscope
Any help?
Thanks guys!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Google App Engine 上也存在类似问题。请参阅此,
我通过放置 _multiprocessing.py 文件修复了此问题进入多处理模块的文件夹。该文件包含以下代码:
这可行,但不是一个可靠的答案。
There was a similar issue on Google App Engine. See this
I fixed this my putting a _multiprocessing.py file into the multiprocessing module's folder. This file contained the code:
This works but it isn't a robust answer.