开发者

unable to get parallel python (pp) running on python 2.7

开发者 https://www.devze.com 2023-01-28 00:22 出处:网络
I am working on windows box with 8 processors. I have to run a python script that does mass data processing. When run as such, the script uses only one processor. I learnt that, to harness the power o

I am working on windows box with 8 processors. I have to run a python script that does mass data processing. When run as such, the script uses only one processor. I learnt that, to harness the power of multiple processors, I can use parallel python (pp) library.

I installed the library on my machine and followed the instructions available at http://www.parallelpython.com/content/view/15/30/#QUICKSMP

However, the code to configure pp fails on my machine:

Python 2.7.1 (r271:86832, Nov 27 2010, 17:19:03) [MSC v.1500 64 bit (AMD64)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> import pp
>>> job_server = pp.Server()

Traceback (most recent call last):
  File "<pyshell#1>", line 1, in <module>
    job_server = pp.Server()
  File "C:\Python27\lib\site-packages\pp.py", line 343, in __init__
    self.set_ncpus(ncpus)
  File "C:\Python27\lib\site-packages\pp.py", line 503, in set_ncpus
    range(ncpus - len(self.__workers))])
  File "C:\Python27\lib\site-packages\pp.py", line 148, in __init__
    self.start()
  File "C:\Python27\lib\site-packages\pp.py", line 161, in start
    self.pid = int(self.t.receive())
  File "C:\Python27\lib\site-packages\pptransport.py", line 134, in receive
    msg_len = struct.unpack("!Q", size_packed)[0]
error: unpack requires a string argument of length 8
>>> 

Can you please tell me how do I get 开发者_开发百科this resolved? I have installed pp version 1.6.0

0

精彩评论

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