我已经在 Windows 上安装了 pymol 的开源版本(https://github.com/schrodinger/pymol-open-source)。
要运行 pymol,我可以在 windows 上打开 python3.8 命令提示符并键入以下内容:
import pymol
pymol.finish_launching()
这将启动 pymol gui。
我现在想创建一个简单的 python 脚本,以便我可以单击脚本(或使用例如 pyinstaller 转换为 Windows 可执行文件),但是如果我将上述命令放在脚本中pymol.py
然后运行:
python pymol.py
python指向python3.8的地方我收到以下错误:
AttributeError: partially initialize module 'pymol' has no attribute 'finish_launching' most likely due to a circular import.
为什么这在命令行 python 上有效,但在脚本中无效,我该如何解决这个问题,以便脚本运行并可以转换为 Windows 可执行文件?