当尝试在 Ubuntu 系统上以桌面模式安装 pgadmin4 时,我收到了 _ctypes 的 ModuleNotFoundError。
我做了一些研究,发现 _ctypes 需要安装 libffi-dev 包。然而,似乎 libffi-dev 和 _ctypes 是为 Python 2.7 安装的,当我运行 import ctypes 时,它似乎可以工作:
$ python2
Python 2.7.15+ (default, Nov 27 2018, 23:36:35)
[GCC 7.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import ctypes
>>>
Run Code Online (Sandbox Code Playgroud)
当我尝试对 Python 3.7 执行相同操作时,它不起作用:
$ python
Python 3.7.3 (default, Jun 21 2019, 12:46:58)
[GCC 7.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import ctypes
Traceback (most …Run Code Online (Sandbox Code Playgroud)