文章目录
正常情况下 : brew install pymol
运行以下命令即可
brew install pymol
实际会遇到的问题:下载错误
许多包都难以下载成功,报以下错误
url: (92) HTTP/2 stream 0 was not closed cleanly: PROTOCOL_ERROR (err 1)
Error: pymol: Failed to download resource "python@3.11"
Download failed: https://www.python.org/ftp/python/3.11.2/Python-3.11.2.tgz
解决:修改hosts文件,追加DNS
即使修改了hosts,也会下载失败,多下载几次可以成功
vim /etc/hosts
185.199.108.133 raw.githubusercontent.com
151.101.1.63 pythonhosted.org
151.101.1.168 python.org
ip可以在https://www.ipaddress.com 查询
启动
在控制台中输入pymol即可启动
其他参考方式
brew安装开源和dmg安装程序,然后替换dmg安装文件夹中启动项
https://blog.csdn.net/weixin_45725149/article/details/123698134
- 安装官网的dmg文件
- 编译github source
- 覆盖:编译好的pymol覆盖dmg安装文件下的pymol
编译
# MacPorts
sudo port install pymol
# Homebrew
brew install brewsci/bio/pymol
覆盖
which pymol
# <where-is-pymol>
sudo cp <where-is-pymol> /Applications/PyMOL.app/Contents/MacOS
覆盖失败
# error
cp: /Applications/PyMOL.app/Contents/MacOS/pymol: Operation not permitted
删掉dmg
brew install pymol
成功,缺陷就是只能从控制台启动pymol
conda安装
https://zhuanlan.zhihu.com/p/514911704
conda install -c conda-forge -c schrodinger pymol-bundle
报错,找不到包
(base) xx@xx ~ % conda install -c conda-forge -c schrodinger pymol-bundle
Retrieving notices: ...working... done
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
PackagesNotFoundError: The following packages are not available from current channels:
- pymol-bundle
Current channels:
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/osx-arm64
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/noarch
- https://conda.anaconda.org/schrodinger/osx-arm64
- https://conda.anaconda.org/schrodinger/noarch
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/osx-arm64
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/noarch
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r/osx-arm64
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r/noarch
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2/osx-arm64
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2/noarch
To search for alternate channels that may provide the conda package you're
looking for, navigate to
https://anaconda.org
and use the search bar at the top of the page.
- https://conda.anaconda.org/schrodinger/osx-arm64
- https://conda.anaconda.org/schrodinger/noarch
换成国内镜像应该可行
并且怀疑从这个schrodinger源安装的pymol-bundle可能是收费的
其他问题:
- 安装anaconda,然后在这个环境中,许多包都难以安装成功,修改镜像之后也难成功,总是装成x86的包,然后导致包冲突。
- 解决:安装mambaforge,更早支持了Apple M1芯片,使用默认源即可安装许多包
- 参考: 一文解释 conda,pip,anaconda,miniconda,miniforge
下一步计划
学习pymol的使用,可视化相互作用界面
安装插件,减少重复工作
- paper:Shortcuts for faster image creation in PyMOL
- Code: https://github.com/MooersLab/pymolshortcuts