[英]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要使用您的 package,只需激活环境,它应该可以工作
conda activate awesome
python -c "import pymatgen"
You should install only the package you need in awesome
你应该只安装你需要的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.这将打开 Jupyter Lab 并提供很棒的软件包。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.