1

pymatgen 模块应该适用于 Python 2.7.x 或 3。两者的文件都可用(https://anaconda.org/matsci/pymatgen/files)。我的 Python (sys.version) 是 2.7.11。

我尝试使用标准安装:"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."

看起来它正在尝试为 Python 3 安装 pymatgen 模块,而我的版本较短。

我想安装 2.7.x 兼容版本,但找不到有关如何强制 conda 安装执行此操作的说明。

由于其他原因,我无法升级到 3.6。

4

3 回答 3

0

无论您安装什么 conda,您都可以使用创建特定的 Python 2.7 环境

conda create --name py27 python=2.7

然后,您应该能够按照 Python 2.7 安装的所有步骤进行操作。

于 2018-09-17T14:01:44.640 回答
0

从运行 Miniconda3-latest-MacOSX-x86_64.sh 而不是 Miniconda2-l​​atest-MacOSX-x86_64.sh 重新启动。

于 2018-01-09T04:11:48.217 回答
0

你试过 pip 吗?

但首先NumPy按照他们提到的安装here

然后使用:pip install pymatgen

于 2017-05-24T23:16:12.237 回答