如何安装pymatgen for Python 2.7.x而不是3.6
问题描述:
pymatgen模块应该适用于Python 2.7.x或3.这两个文件都可用(https://anaconda.org/matsci/pymatgen/files)。我的Python(sys.version)是2.7.11。如何安装pymatgen for Python 2.7.x而不是3.6
我试着用标准安装:"conda install -c mastic pymatgen"
,但它返回一个错误:
"Fetching package metadata ...........
Solving package specifications: .
UnsatisfiableError: The following specifications were found to be in conflict:
- pymatgen -> python 3.6*
- python 3.5*
Use "conda info <package>" to see the dependencies for each package."
看起来它正试图安装pymatgen模块为Python 3,我是一个短版本。
我想安装2.7.x兼容版本,但无法找到有关如何强制conda安装来执行此操作的说明。
由于其他原因,我无法升级到3.6。
答
运行Miniconda3-latest-MacOSX-x86_64.sh重新开始,而不是Miniconda2-latest-MacOSX-x86_64.sh。
我认为本指南可能有助于https://conda.io/docs/py2or3.html#use-a-different-version-of-python – davedwards