异常代码:

Traceback (most recent call last):
   File "", line 1, in 
   File "/usr/local/lib/python3.4/multiprocessing/context.py", line 132, in Value
      from .sharedctypes import Value
   File "/usr/local/lib/python3.4/multiprocessing/sharedctypes.py", line 10, in <
module>
   import ctypes
   File "/usr/local/lib/python3.4/ctypes/__init__.py", line 7, in 
      from _ctypes import Union, Structure, Array
ImportError: No module named '_ctypes'

解决方案

#安装libffi-dev并重新安装python3.7对我来说解决了这个问题。

#干净地构建py 3.7 libffi-dev 是必需的,否则以后的工作将失败

#如果使用RHEL / Fedora:

yum install libffi-devel
#或者

sudo dnf install libffi-devel
#如果使用Debian / Ubuntu:

sudo apt-get install libffi-dev