开发者

Missing multiprocessing module when freezing Python code

开发者 https://www.devze.com 2022-12-25 09:58 出处:网络
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

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 开发者_StackOverflow中文版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!


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:

import multiprocessing

This works but it isn't a robust answer.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号