我試圖運行生物技術軟件pymol。它找不到cmd.py
模塊。但是,它位於$ PYTHONPATH中的目錄中。爲什麼我不能啓動pymol?
[mzhKU_work] @ modules $ python launch_pymol.py
Traceback (most recent call last):
File "launch_pymol.py", line 32, in <module>
import pymol
File "/Users/mzhKU_work/software/pymol/modules/pymol/__init__.py", line 521, in <module>
import pymol._cmd
ImportError: No module named _cmd
[mzhKU_work] @ modules $ ls ./pymol/
__init__.py exporting.py opengl
__init__.pyc externing.py parser.py
api.py feedingback.py parsing.py
callback.py fitting.py plugins
cgo.py gui.py povray.py
checking.py gui.pyc preset.py
cmd.py headering.py querying.py
cmd.pyc helping.py rpc.py
colorramping.py importing.py selecting.py
commanding.py internal.py selector.py
completing.py invocation.py setting.py
computing.py invocation.pyc shortcut.py
constants.py keyboard.py util.py
constants_palette.py keywords.py vfont.py
contrib locking.py viewing.py
controlling.py m4x.py wizard
creating.py menu.py wizarding.py
editing.py monitoring.py xray.py
editor.py morphing.py xwin.py
embed movie.py xwin.pyc
experimenting.py moving.py
[mzhKU_work] @ modules $ echo $PYTHONPATH
[...]/Users/mzhKU_work/software/pymol/modules:/Users/mzhKU_work/software/pymol/modules/pymol:/Users/[...]
[mzhKU_work] @ modules $
可能是什麼問題?
你可以打開'/ Users/mzhKU_work/software/pymol/modules/pymol /'目錄並檢查_cmd.so'(或者你的系統上的任何本地庫的擴展名,我猜是.so Mac OS X)在目錄中? PyMol通常附帶'cmd.py'和'_cmd.so',所以重命名這兩個文件都不是一個好的解決方案。 –
哦等一下,這個問題似乎是缺少'_cmd.so'。 你從哪裏安裝PyMol?你是否使用Homebrew/MacPorts,學生版或其他安裝程序? –