简体   繁体   English

在 ubuntu 中安装 package 的冻结解决环境步骤

[英]frozen solving environment step in installing a package in ubuntu

I am trying to install moose framework in my ubuntu ( 20.4 ).我正在尝试在我的 ubuntu ( 20.4 ) 中安装 moose 框架 It has three main steps: exporting path of miniconda using:它包含三个主要步骤: 使用以下命令导出 miniconda 的路径:

export PATH=$HOME/miniconda3/bin:$PATH

Configuring Conda to work with conda-forge, and channel of developers of moose:配置 Conda 以使用 conda-forge 和 moose 开发人员的频道:

conda config --add channels conda-forge
conda config --add channels idaholab

and finally installing the framework using:最后使用以下方法安装框架:

conda create --name moose moose-libmesh moose-tools

I tried it several times but I stuck in the solving environment step (version of my conda is also 4.8.3 ).我尝试了几次,但我陷入了solving environment步骤(我的 conda 版本也是4.8.3 )。 I do appreciate if anyone help me to handle this problem.如果有人帮助我解决这个问题,我将不胜感激。

Option 1: Use Mamba选项 1:使用 Mamba

That is a beast of an environment once it does eventually solve.一旦它最终解决,那将是一个环境的野兽。 Conda will struggle to solve it. Conda 将难以解决它。 I recommend using Mamba instead:我建议改用Mamba

## install mamba
conda install -n base conda-forge::mamba

## create 'moose' env
mamba create -n moose moose-libmesh moose-tools

Option 2: Add Constraints选项 2:添加约束

I was able to get Conda to solve it, but with some tweaks based on insights from what Mamba got.我能够让 Conda 解决它,但根据 Mamba 得到的见解进行了一些调整。 It still took several minutes to solve though.仍然需要几分钟才能解决。 Here's the command that worked:这是有效的命令:

conda create -n moose -c idaholab -c conda-forge --override-channels moose-libmesh moose-tools python=3.7

That is, I use only the two channels (no defaults channel) and pre-specify that Python should be version 3.7.也就是说,我使用两个通道(没有默认通道)并预先指定 Python 应该是 3.7 版本。 Sometimes leaving a Python dependency underspecified leads to a huge satisfiability problem and Conda just does not handle it well.有时,未指定 Python 依赖项会导致巨大的可满足性问题,而 Conda 不能很好地处理它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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