【问题标题】:install packages based on spec-list conda根据规范列表 conda 安装软件包
【发布时间】:2021-11-06 22:52:17
【问题描述】:

我在下面使用conda list --explicit > spec-list.txt 生成了一个规格列表

# This file may be used to create an environment using:
# $ conda create --name <env> --file <this file>
# platform: linux-64
@EXPLICIT
https://repo.anaconda.com/pkgs/main/linux-64/conda-env-2.6.0-1.conda
https://conda.anaconda.org/conda-forge/linux-64/_libgcc_mutex-0.1-conda_forge.tar.bz2
https://repo.anaconda.com/pkgs/main/noarch/_sysroot_linux-64_curr_repodata_hack-3-haa98f57_10.tar.bz2
https://repo.anaconda.com/pkgs/main/linux-64/blas-1.0-mkl.conda
https://repo.anaconda.com/pkgs/main/linux-64/ca-certificates-2021.10.26-h06a4308_2.conda
https://repo.anaconda.com/pkgs/main/linux-64/intel-openmp-2021.2.0-h06a4308_610.conda
https://repo.anaconda.com/pkgs/main/linux-64/ld_impl_linux-64-2.35.1-h7274673_9.conda
https://repo.anaconda.com/pkgs/main/linux-64/libgcc-devel_linux-64-9.3.0-hb95220a_17.conda

我知道我可以使用以下方法创建它的环境:

conda create --name python-course --file spec-list.txt

但我想将此列表安装到基本环境中。但是,什么也没发生。有人可以帮忙吗?谢谢!

$ conda install --name base --file spec-list.txt
Preparing transaction: done
Verifying transaction: done
Executing transaction: done

【问题讨论】:

    标签: python anaconda conda


    【解决方案1】:

    使用 Conda 的 base,1 通常是个坏主意,但是,要安装带有规范列表的附加软件包,可以使用conda update 命令,例如

    conda update -n foo --file spec-list.txt
    

    [1] 例如,即使在 OP 共享的那个小 sn-p 中,我们也看到了一个 conda-env 包。该软件包已被弃用多年,并可能与conda 的现代版本发生冲突,后者现在同时打包了condaconda-env Python 模块。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-10-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多