在Chemistry Stack Exchange 上,我问了一个关于 Open Babel 和 Python 一起使用的问题。
问题是我提供的答案(由 Geoff Hutchinson 提供)要求 Python 能够导入模块 Pybel。
我已经通过两种方式在这台 PC 上安装了 Open Babel,APT 和源代码。在我意识到 pybel 不可用于 Python 之后,我删除了我的 APT 安装,我决定从源代码安装 Python 绑定。
为此,我按照本指南将最终命令定制为(从 运行~/build)
cmake ../openbabel-2.3.2 -DBUILD_GUI=ON -DPYTHON_BINDINGS=ON
Run Code Online (Sandbox Code Playgroud)
这给出了输出:
-- Using included inchi library.
-- Found wxWidgets: TRUE
-- Cairo found. PNG output will be supported.
-- Attempting to build the GUI
-- wxWidgets found => GUI will be built
CMake Warning (dev) at test/CMakeLists.txt:171 (include): …Run Code Online (Sandbox Code Playgroud)