Python多处理管理器列表所需的库



我的代码在我的机器上效果很好,但在另一台机器上:

Process child:
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/multiprocessing/managers.py", line 749, in _callmethod
AttributeError: 'ForkAwareLocal' object has no attribute 'connection'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
  File "/usr/local/lib/python3.6/multiprocessing/process.py", line 93, in run
  File "/home/eri/Projects/server/child.py", line 215, in setup_loop
  File "/home/eri/Projects/server/child.py", line 164, in setup_clients
  File "<string>", line 2, in append
  File "/usr/local/lib/python3.6/multiprocessing/managers.py", line 753, in _callmethod
  File "/usr/local/lib/python3.6/multiprocessing/managers.py", line 740, in _connect
  File "/usr/local/lib/python3.6/multiprocessing/connection.py", line 487, in Client
  File "/usr/local/lib/python3.6/multiprocessing/connection.py", line 614, in SocketClient
FileNotFoundError: [Errno 2] No such file or directory

python是由来源建造的。也许有些lib未配置?

Python build finished successfully!
The necessary bits to build these optional modules were not found:
_bz2                  _curses               _curses_panel      
_dbm                  _gdbm                 _lzma              
_sqlite3              _ssl                  _tkinter           
readline                                                       
To find the necessary bits, look in setup.py in detect_modules() for the module's name.
The following modules found by detect_modules() in setup.py, have been
built by the Makefile instead, as configured by the Setup files:
atexit                pwd                   time               

主要过程加入孩子。

Manager()类在local上下文中。使其global解决了我的问题。