首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >在使用conda安装软件包时发现冲突

在使用conda安装软件包时发现冲突
EN

Stack Overflow用户
提问于 2022-03-10 10:23:06
回答 1查看 2.8K关注 0票数 0

我试图在ubuntu 20.04上的conda环境中安装trim-galore,这条消息出现了,因为这是我第一次使用它,我不知道如何解决这个问题:

代码语言:javascript
运行
复制
    Collecting package metadata (current_repodata.json): done
    Solving environment: failed with initial frozen solve. Retrying with flexible solve.
    Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
    Collecting package metadata (repodata.json): done
    Solving environment: failed with initial frozen solve. Retrying with flexible solve.
    Solving environment: / 
    Found conflicts! Looking for incompatible packages.
    This can take several minutes.  Press CTRL-C to abort.
    failed                                                                    
    
    UnsatisfiableError: The following specifications were found
    to be incompatible with the existing python installation in your environment:
    
    Specifications:
    
      - trim-galore -> python[version='2.7.*|3.5.*|3.6.*|>=2.7,<2.8.0a0|>=3.6,<3.7.0a0|>=3.7,<3.8.0a0|>=3.8,<3.9.0a0|>=3.9,<3.10.0a0|>=3.5,<3.6.0a0|3.4.*']
    
    Your python: python=3.10
    
    If python is on the left-most side of the chain, that's the version you've asked for.
    When python appears to the right, that indicates that the thing on the left is somehow
    not available for the python version you are constrained to. Note that conda will not
    change your python version to a different minor version unless you explicitly specify
    that.
    
    The following specifications were found to be incompatible with your system:
    
      - feature:/linux-64::__glibc==2.31=0
      - python=3.10 -> libgcc-ng[version='>=7.5.0'] -> __glibc[version='>=2.17']
    
    Your installed version is: 2.31

我运行的命令是conda install -c bioconda trim-galore,在激活了我的环境之后,我就运行它。

conda的版本为4.11.0

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-03-10 13:21:11

您以前已经指定

代码语言:javascript
运行
复制
python=3.10

为了这个环境。很可能是在创建它的时候。这为这个python版本创建了一个引脚。现在,当您尝试安装trim-galore时,问题是它除其他外依赖于cutadapt,而该版本不存在支持python3.10的版本:

代码语言:javascript
运行
复制
conda search -c bioconda --info cutadapt=3.7
Loading channels: done
cutadapt 3.7 py37h8902056_0
---------------------------
file name   : cutadapt-3.7-py37h8902056_0.tar.bz2
name        : cutadapt
version     : 3.7
build       : py37h8902056_0
build number: 0
size        : 197 KB
license     : MIT
subdir      : linux-64
url         : https://conda.anaconda.org/bioconda/linux-64/cutadapt-3.7-py37h8902056_0.tar.bz2
md5         : 372ffd8db0a584443d817f2f91b95cdf
timestamp   : 2022-02-23 18:06:03 UTC
dependencies:
  - dnaio >=0.7.0
  - libgcc-ng >=10.3.0
  - python >=3.7,<3.8.0a0
  - python_abi 3.7.* *_cp37m
  - xopen >=1.2.0


cutadapt 3.7 py37h8902056_1
---------------------------
file name   : cutadapt-3.7-py37h8902056_1.tar.bz2
name        : cutadapt
version     : 3.7
build       : py37h8902056_1
build number: 1
size        : 197 KB
license     : MIT
subdir      : linux-64
url         : https://conda.anaconda.org/bioconda/linux-64/cutadapt-3.7-py37h8902056_1.tar.bz2
md5         : bb181439876574c985916d94dce49979
timestamp   : 2022-02-25 22:48:07 UTC
dependencies:
  - dnaio >=0.7.0
  - libgcc-ng >=10.3.0
  - python >=3.7,<3.8.0a0
  - python_abi 3.7.* *_cp37m
  - xopen >=1.2.0


cutadapt 3.7 py38hbff2b2d_0
---------------------------
file name   : cutadapt-3.7-py38hbff2b2d_0.tar.bz2
name        : cutadapt
version     : 3.7
build       : py38hbff2b2d_0
build number: 0
size        : 201 KB
license     : MIT
subdir      : linux-64
url         : https://conda.anaconda.org/bioconda/linux-64/cutadapt-3.7-py38hbff2b2d_0.tar.bz2
md5         : e38630777b8d17687134aa015ca88385
timestamp   : 2022-02-23 18:01:48 UTC
dependencies:
  - dnaio >=0.7.0
  - libgcc-ng >=10.3.0
  - python >=3.8,<3.9.0a0
  - python_abi 3.8.* *_cp38
  - xopen >=1.2.0


cutadapt 3.7 py38hbff2b2d_1
---------------------------
file name   : cutadapt-3.7-py38hbff2b2d_1.tar.bz2
name        : cutadapt
version     : 3.7
build       : py38hbff2b2d_1
build number: 1
size        : 201 KB
license     : MIT
subdir      : linux-64
url         : https://conda.anaconda.org/bioconda/linux-64/cutadapt-3.7-py38hbff2b2d_1.tar.bz2
md5         : c8101ce2f3ffcbca9b3bb2df93a9730f
timestamp   : 2022-02-25 22:44:37 UTC
dependencies:
  - dnaio >=0.7.0
  - libgcc-ng >=10.3.0
  - python >=3.8,<3.9.0a0
  - python_abi 3.8.* *_cp38
  - xopen >=1.2.0


cutadapt 3.7 py39hbf8eff0_0
---------------------------
file name   : cutadapt-3.7-py39hbf8eff0_0.tar.bz2
name        : cutadapt
version     : 3.7
build       : py39hbf8eff0_0
build number: 0
size        : 200 KB
license     : MIT
subdir      : linux-64
url         : https://conda.anaconda.org/bioconda/linux-64/cutadapt-3.7-py39hbf8eff0_0.tar.bz2
md5         : 5aaca511ac0bbc132a07a4ee9b1a7a64
timestamp   : 2022-02-23 17:57:41 UTC
dependencies:
  - dnaio >=0.7.0
  - libgcc-ng >=10.3.0
  - python >=3.9,<3.10.0a0
  - python_abi 3.9.* *_cp39
  - xopen >=1.2.0


cutadapt 3.7 py39hbf8eff0_1
---------------------------
file name   : cutadapt-3.7-py39hbf8eff0_1.tar.bz2
name        : cutadapt
version     : 3.7
build       : py39hbf8eff0_1
build number: 1
size        : 200 KB
license     : MIT
subdir      : linux-64
url         : https://conda.anaconda.org/bioconda/linux-64/cutadapt-3.7-py39hbf8eff0_1.tar.bz2
md5         : cde0658556fc58ac82a54986971020ad
timestamp   : 2022-02-25 22:41:16 UTC
dependencies:
  - dnaio >=0.7.0
  - libgcc-ng >=10.3.0
  - python >=3.9,<3.10.0a0
  - python_abi 3.9.* *_cp39
  - xopen >=1.2.0

您还可以在错误消息中告诉conda发现兼容的python版本列表。

代码语言:javascript
运行
复制
python[version='2.7.*|3.5.*|3.6.*|>=2.7,<2.8.0a0|>=3.6,<3.7.0a0|>=3.7,<3.8.0a0|>=3.8,<3.9.0a0|>=3.9,<3.10.0a0|>=3.5,<3.6.0a0|3.4.*']

有了引脚python=3.10,conda不能降级您的python版本,但是有两种简单的方法可以解决这个问题:

conda create -n tg -c conda-forge -c bioconda python trim-galore

  • python指定为安装目标:conda install -c conda-forge -c bioconda trim-galore python使conda能够确定要将env更改为
  • 的哪个python版本,创建一个新的环境,从一开始就指定您需要的内容:
票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/71422525

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档