我想在我的 PC 上安装 PyMOL。我昨天卸载了它,因为我之前通过 Python(x,y) 安装了 python 2.7.9,而我的 PyMOL 安装(几个月前安装的,所以我恐怕我忘了是怎么安装的)使用的是 python 2.7.8,结果 PyMOL 不再正常工作,例如,看看我截取的这个屏幕截图,GUI 分子查看器不可见,只有控制台。
我曾尝试使用wheels文件(即http://www.lfd.uci.edu/~gohlke/pythonlibs/#pymolamd64 版本),但我遇到了 pip 问题。查看我的 64 位 Python 2.7.9 安装附带的 pip,pip 的 exe 文件名为 pip2.exe。因此,我将系统环境变量更改PYTHONPATH
为C:\Python27
(python 安装所在的位置) 并将其更改PATH
为C:\Python27\Scripts
which is 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']