Is Workerpool Compatible With Python3.4 On Windows?
I installed workerpool using pip install and the installation worked fine. import workerpool I get C:\Python34\lib\site-packages\workerpool\__init__.py in () 23
Solution 1:
Looking at the source for workerpool/__init__.py, it appears that workerpool is not compatible with Python 3 because of the implicit relative imports. E.g.,
from exceptions import *
from jobs import *
from pools import *
from workers import *
Now, if you wanted to fix this problem you could edit the source to:
from .exceptionsimport *
from .jobsimport *
from .poolsimport *
from .workersimport *
And glancing through the rest of the source files it looks like it might work if all of the implicit relative imports were fixed.
In Python 3, the Queue
module was renamed to queue
. To fix that you can change:
fromQueueimportQueue
To:
from queue import Queue
Or, if you want to support both:
try:
from queue import Queue
except ImportError:
from Queue import Queue
That import occurs in:
- workerpool/QueueWrapper.py on line 10.
- workerpool/pools.py on line 8.
Post a Comment for "Is Workerpool Compatible With Python3.4 On Windows?"