qinxuye/cola

windows下coca无法启动分布式程序

rena521 opened this issue · 1 comments

Win7下,用coca运行分布式程序,报错如下:
RuntimeError:
Attempt to start a new process before the current process
has finished its bootstrapping phase.

        This probably means that you are on Windows and you have
        forgotten to use the proper idiom in the main module:

            if __name__ == '__main__':
                freeze_support()
                ...

        The "freeze_support()" line can be omitted if the program
        is not going to be frozen to produce a Windows executable.

Traceback (most recent call last):
File "C:\Python27\Scripts\coca-script.py", line 8, in
load_entry_point('cola==0.1.0beta', 'console_scripts', 'coca')()
File "C:\Python27\lib\site-packages\cola-0.1.0beta-py2.7.egg\cola\cmdline.py",
line 38, in execute
args.func(args)
File "C:\Python27\lib\site-packages\cola-0.1.0beta-py2.7.egg\cola\commands\mas
ter.py", line 49, in run
working_dir=args.working)
File "C:\Python27\lib\site-packages\cola-0.1.0beta-py2.7.egg\cola\context.py",
line 113, in init
self.manager.start(manager_init)
File "C:\Python27\lib\multiprocessing\managers.py", line 528, in start
self._address = reader.recv()
EOFError

确定了是setuptools版本过旧的问题。

更新setuptools,重新安装pip:easy_install -U pip,然后重新安装cola能解决问题。

pip uninstall cola
pip install cola