简体   繁体   中英

conda install --channel conda-forge pymatgen

I tried to run the following code:

conda install --channel conda-forge pymatgen

but I encounter the following error:

Collecting package metadata (current_repodata.json): done
Solving environment: |
The environment is inconsistent, please check the package plan carefully
The following packages are causing the inconsistency:

  - defaults/win-64::anaconda==2019.10=py37_0
  - defaults/win-64::anaconda-client==1.7.2=py37_0
  - defaults/win-64::anaconda-navigator==1.10.0=py37_0
  - conda-forge/noarch::anaconda-project==0.8.3=py_0
  - defaults/win-64::astropy==3.2.1=py37he774522_0
  - conda-forge/noarch::backports.functools_lru_cache==1.6.1=py_0
  - defaults/win-64::bleach==3.1.0=py37_0
  - defaults/win-64::bokeh==1.3.4=py37_0
  - defaults/win-64::clyent==1.2.2=py37_1
.
.
.
...
failed with initial frozen solve. Retrying with flexible solve.

Could you please help me fix this error? Thanks

Installing packages in the base environment is not a recommended strategy. The best solution is always to create environment for each project with minimum packages:

# create environment called awesome with python 3.8 and install package
conda create --name awesome python=3.8
conda install --name awesome --channel conda-forge pymatgen

To use your package, just activate environment and it should work

conda activate awesome
python -c "import pymatgen"

You should install only the package you need in awesome

# example 
conda activate awesome 
conda install scikit-learn pandas jupyterlab

# while in awesome env (awesome)
jupyter lab

This will open Jupyter Lab with awesome packages available.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM