我想在我的電腦上安裝 PyMOL。我昨天卸載了它,因為我之前透過Python(x,y) 安裝了python 2.7.9,而我的PyMOL 安裝(我幾個月前安裝的,所以我擔心我忘記了我是如何做到的)正在使用python 2.7.8 和結果是 PyMOL 不再正常工作,例如,看看我拍攝的螢幕截圖,GUI 分子檢視器不可見,只有控制台。
我嘗試過使用輪子檔案(即http://www.lfd.uci.edu/~gohlke/pythonlibs/#pymolamd64版本)但我遇到了pip問題。請參閱我隨 64 位元 Python 2.7.9 安裝一起提供的 pip,pip 的 exe 檔名為 pip2.exe。因此,我將系統環境變數更改PYTHONPATH
為C:\Python27
(python 安裝所在的位置)和whichPATH
為C:\Python27\Scripts
where pip2.exe
is(以及 pip2.7.exe、easy_install.exe 和 easy_install-2.7.exe,如果相關的話)。然後我跑了:
pip2 install pymol-1.7.2.1-cp27-none-win_amd64.whl
從命令提示符,但這給了錯誤:
Traceback (most recent call last):
File "C:\Python27\lib\runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "C:\Python27\lib\runpy.py", line 72, in _run_code
exec code in run_globals
File "C:\Python27\Scripts\pip2.exe\__main__.py", line 5, in <module>
ImportError: No module named pip
編輯:#1
我卸載了python 並重新安裝了它(再次是64 位元),因為我懷疑之前的安裝中出現了一些錯誤(這次附帶的pip 在Scripts 資料夾中包含一個名為pip.exe 的檔案),然後我運行了pymol 安裝再次命令(運行後pip install wheel-0.24.0-py2.py3-none-any.whl
,從下載該文件https://pypi.python.org/packages/py2.py3/w/wheel/wheel-0.24.0-py2.py3-none-any.whl#md5=4c24453cda2177fd42c5d62d6434679a)並收到不同的錯誤,可以在此處找到 pip.log 檔案:http://goo.gl/ORVNPB。
進一步的嘗試
然後我下載了https://codeload.github.com/evonove/pymol/zip/1.7.4,提取其內容並運行
python setup.py 建置安裝
這給出了輸出:
running build
running build_py
running build_ext
building 'pymol._cmd' extension
Traceback (most recent call last):
File "setup.py", line 349, in <module>
data_files = data_files
File "C:\Python27\lib\distutils\core.py", line 151, in setup
dist.run_commands()
File "C:\Python27\lib\distutils\dist.py", line 953, in run_commands
self.run_command(cmd)
File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "C:\Python27\lib\distutils\command\build.py", line 127, in run
self.run_command(cmd_name)
File "C:\Python27\lib\distutils\cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "C:\Python27\lib\distutils\command\build_ext.py", line 337, in run
self.build_extensions()
File "C:\Python27\lib\distutils\command\build_ext.py", line 446, in build_exte
nsions
self.build_extension(ext)
File "C:\Python27\lib\distutils\command\build_ext.py", line 496, in build_exte
nsion
depends=ext.depends)
File "C:\Python27\lib\distutils\msvc9compiler.py", line 473, in compile
self.initialize()
File "C:\Python27\lib\distutils\msvc9compiler.py", line 383, in initialize
vc_env = query_vcvarsall(VERSION, plat_spec)
File "C:\Python27\lib\distutils\msvc9compiler.py", line 299, in query_vcvarsal
l
raise ValueError(str(list(result.keys())))
ValueError: [u'path']