如何在 ubuntu20 中使用 conda 安装 bob.learn.em?

How to install bob.learn.em using conda in ubuntu20?

我正在尝试从 https://gitlab.idiap.ch/bob/bob.learn.em

安装 bob.learn.em

我也试过在 google colab 中安装它。我收到以下错误:

Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.

PackagesNotFoundError: The following packages are not available from current channels:

  - bob.learn.em

Current channels:

  - https://conda.anaconda.org/conda-forge/linux-64
  - https://conda.anaconda.org/conda-forge/noarch

To search for alternate channels that may provide the conda package you're
looking for, navigate to

    https://anaconda.org

and use the search bar at the top of the page.

我也尝试了 conda 页面中的命令,

conda install -c conda-forge/label/broken bob.learn.em

我尝试使用受支持的 python 3.5,但随后出现以下错误:

conda activate bob_plda
(bob_plda) root@ti-SYS-1029GQ-TVRT:/sre# conda install -c conda-forge/label/broken bob.learn.em
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 each other:

Output in format: Requested package -> Available versionsThe following specifications were found to be incompatible with your system:

  - feature:/linux-64::__glibc==2.27=0
  - feature:|@/linux-64::__glibc==2.27=0

Your installed version is: 2.27

您错过了包含 Bob 的频道。即 conda config --env --add channels https://www.idiap.ch/software/bob/conda

Github link 提到您首先必须遵循以下说明:Bob Install Instructions,在 运行 conda install bob.learn.em 之前,这是您设置所有渠道和依赖关系,这样你就不会得到这样的错误。

所以,我使用了 anaconda3 docker,它在 python 3.5 环境下工作。

tit@tit-SYSRT:~/nab_projs/bob_plda$ docker run -i -t continuumio/anaconda3 /bin/bash
(base) root@fe1d92faab62:/# conda create -n py35 python=3.5
Collecting package metadata (current_repodata.json): done
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: done


==> WARNING: A newer version of conda exists. <==
  current version: 4.10.1
  latest version: 4.10.3

Please update conda by running

    $ conda update -n base -c defaults conda



## Package Plan ##

  environment location: /opt/conda/envs/py35

  added / updated specs:
    - python=3.5


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    _libgcc_mutex-0.1          |             main           3 KB
    _openmp_mutex-4.5          |            1_gnu          22 KB
    ca-certificates-2021.9.30  |       h06a4308_1         116 KB
    certifi-2020.6.20          |     pyhd3eb1b0_3         155 KB
    libffi-3.3                 |       he6710b0_2          50 KB
    libgcc-ng-9.3.0            |      h5101ec6_17         4.8 MB
    libgomp-9.3.0              |      h5101ec6_17         311 KB
    libstdcxx-ng-9.3.0         |      hd4cf53a_17         3.1 MB
    ncurses-6.2                |       he6710b0_1         817 KB
    openssl-1.1.1l             |       h7f8727e_0         2.5 MB
    pip-10.0.1                 |           py35_0         1.6 MB
    python-3.5.6               |       h12debd9_1        24.9 MB
    readline-8.1               |       h27cfd23_0         362 KB
    setuptools-40.2.0          |           py35_0         490 KB
    sqlite-3.36.0              |       hc218d9a_0         990 KB
    tk-8.6.11                  |       h1ccaba5_0         3.0 MB
    wheel-0.37.0               |     pyhd3eb1b0_1          33 KB
    xz-5.2.5                   |       h7b6447c_0         341 KB
    zlib-1.2.11                |       h7b6447c_3         103 KB
    ------------------------------------------------------------
                                           Total:        43.6 MB

The following NEW packages will be INSTALLED:

  _libgcc_mutex      pkgs/main/linux-64::_libgcc_mutex-0.1-main
  _openmp_mutex      pkgs/main/linux-64::_openmp_mutex-4.5-1_gnu
  ca-certificates    pkgs/main/linux-64::ca-certificates-2021.9.30-h06a4308_1
  certifi            pkgs/main/noarch::certifi-2020.6.20-pyhd3eb1b0_3
  libffi             pkgs/main/linux-64::libffi-3.3-he6710b0_2
  libgcc-ng          pkgs/main/linux-64::libgcc-ng-9.3.0-h5101ec6_17
  libgomp            pkgs/main/linux-64::libgomp-9.3.0-h5101ec6_17
  libstdcxx-ng       pkgs/main/linux-64::libstdcxx-ng-9.3.0-hd4cf53a_17
  ncurses            pkgs/main/linux-64::ncurses-6.2-he6710b0_1
  openssl            pkgs/main/linux-64::openssl-1.1.1l-h7f8727e_0
  pip                pkgs/main/linux-64::pip-10.0.1-py35_0
  python             pkgs/main/linux-64::python-3.5.6-h12debd9_1
  readline           pkgs/main/linux-64::readline-8.1-h27cfd23_0
  setuptools         pkgs/main/linux-64::setuptools-40.2.0-py35_0
  sqlite             pkgs/main/linux-64::sqlite-3.36.0-hc218d9a_0
  tk                 pkgs/main/linux-64::tk-8.6.11-h1ccaba5_0
  wheel              pkgs/main/noarch::wheel-0.37.0-pyhd3eb1b0_1
  xz                 pkgs/main/linux-64::xz-5.2.5-h7b6447c_0
  zlib               pkgs/main/linux-64::zlib-1.2.11-h7b6447c_3


Proceed ([y]/n)? y


Downloading and Extracting Packages
xz-5.2.5             | 341 KB    | ##################################### | 100%
zlib-1.2.11          | 103 KB    | ##################################### | 100%
libffi-3.3           | 50 KB     | ##################################### | 100%
python-3.5.6         | 24.9 MB   | ##################################### | 100%
readline-8.1         | 362 KB    | ##################################### | 100%
libgomp-9.3.0        | 311 KB    | ##################################### | 100%
setuptools-40.2.0    | 490 KB    | ##################################### | 100%
certifi-2020.6.20    | 155 KB    | ##################################### | 100%
wheel-0.37.0         | 33 KB     | ##################################### | 100%
sqlite-3.36.0        | 990 KB    | ##################################### | 100%
libstdcxx-ng-9.3.0   | 3.1 MB    | ##################################### | 100%
_openmp_mutex-4.5    | 22 KB     | ##################################### | 100%
ncurses-6.2          | 817 KB    | ##################################### | 100%
openssl-1.1.1l       | 2.5 MB    | ##################################### | 100%
tk-8.6.11            | 3.0 MB    | ##################################### | 100%
ca-certificates-2021 | 116 KB    | ##################################### | 100%
pip-10.0.1           | 1.6 MB    | ##################################### | 100%
_libgcc_mutex-0.1    | 3 KB      | ##################################### | 100%
libgcc-ng-9.3.0      | 4.8 MB    | ##################################### | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
#     $ conda activate py35
#
# To deactivate an active environment, use
#
#     $ conda deactivate

(base) root@fe1d92faab62:/# conda activate py35
(py35) root@fe1d92faab62:/# ls
bin   dev  home  lib64  mnt  proc  run   srv  tmp  var
boot  etc  lib   media  opt  root  sbin  sys  usr
(py35) root@fe1d92faab62:/# conda config --add channels conda-forge
(py35) root@fe1d92faab62:/# conda install -c conda-forge/label/broken bob.learn.em
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: done


==> WARNING: A newer version of conda exists. <==
  current version: 4.10.1
  latest version: 4.10.3

Please update conda by running

    $ conda update -n base -c defaults conda



## Package Plan ##

  environment location: /opt/conda/envs/py35

  added / updated specs:
    - bob.learn.em


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    blas-1.1                   |         openblas           1 KB  conda-forge
    bob.blitz-2.0.11           |      np111py35_0         2.4 MB  conda-forge/label/broken
    bob.core-2.1.6             |           py35_0         3.6 MB  conda-forge/label/broken
    bob.extension-2.3.7        |           py35_0         317 KB  conda-forge/label/broken
    bob.io.base-2.0.12         |py35_hdf51.8.17_0         2.6 MB  conda-forge/label/broken
    bob.learn.activation-2.0.7 |           py35_0         1.2 MB  conda-forge/label/broken
    bob.learn.em-2.0.11        |           py35_0         8.3 MB  conda-forge/label/broken
    bob.learn.linear-2.0.10    |           py35_0         2.1 MB  conda-forge/label/broken
    bob.math-2.0.6             |np111py35_blas_openblas_200         1.9 MB  conda-forge/label/broken
    bob.sp-2.0.7               |           py35_0         2.8 MB  conda-forge/label/broken
    boost-1.61.0               |           py35_1        17.7 MB  conda-forge
    ca-certificates-2016.2.28  |                1         158 KB  conda-forge/label/broken
    certifi-2018.8.24          |        py35_1001         139 KB  conda-forge
    hdf5-1.8.17                |               11         4.0 MB  conda-forge
    icu-56.1                   |                4        21.9 MB  conda-forge
    libblitz-0.10              |                0         169 KB  conda-forge
    libgfortran-3.0.0          |                1         281 KB  conda-forge
    numpy-1.11.0               |py35_blas_openblas_100         6.8 MB  conda-forge/label/broken
    openblas-0.2.18            |                6        14.1 MB  conda-forge
    openssl-1.1.1k             |       h7f98852_0         2.1 MB  conda-forge
    ------------------------------------------------------------
                                           Total:        92.6 MB

The following NEW packages will be INSTALLED:

  blas               conda-forge/linux-64::blas-1.1-openblas
  bob.blitz          conda-forge/label/broken/linux-64::bob.blitz-2.0.11-np111py35_0
  bob.core           conda-forge/label/broken/linux-64::bob.core-2.1.6-py35_0
  bob.extension      conda-forge/label/broken/linux-64::bob.extension-2.3.7-py35_0
  bob.io.base        conda-forge/label/broken/linux-64::bob.io.base-2.0.12-py35_hdf51.8.17_0
  bob.learn.activat~ conda-forge/label/broken/linux-64::bob.learn.activation-2.0.7-py35_0
  bob.learn.em       conda-forge/label/broken/linux-64::bob.learn.em-2.0.11-py35_0
  bob.learn.linear   conda-forge/label/broken/linux-64::bob.learn.linear-2.0.10-py35_0
  bob.math           conda-forge/label/broken/linux-64::bob.math-2.0.6-np111py35_blas_openblas_200
  bob.sp             conda-forge/label/broken/linux-64::bob.sp-2.0.7-py35_0
  boost              conda-forge/linux-64::boost-1.61.0-py35_1
  hdf5               conda-forge/linux-64::hdf5-1.8.17-11
  icu                conda-forge/linux-64::icu-56.1-4
  libblitz           conda-forge/linux-64::libblitz-0.10-0
  libgfortran        conda-forge/linux-64::libgfortran-3.0.0-1
  numpy              conda-forge/label/broken/linux-64::numpy-1.11.0-py35_blas_openblas_100
  openblas           conda-forge/linux-64::openblas-0.2.18-6

The following packages will be SUPERSEDED by a higher-priority channel:

  ca-certificates    pkgs/main::ca-certificates-2021.9.30-~ --> conda-forge/label/broken::ca-certificates-2016.2.28-1
  certifi            pkgs/main/noarch::certifi-2020.6.20-p~ --> conda-forge/linux-64::certifi-2018.8.24-py35_1001
  openssl              pkgs/main::openssl-1.1.1l-h7f8727e_0 --> conda-forge::openssl-1.1.1k-h7f98852_0


Proceed ([y]/n)? y


Downloading and Extracting Packages
ca-certificates-2016 | 158 KB    | ##################################### | 100%
openblas-0.2.18      | 14.1 MB   | ##################################### | 100%
certifi-2018.8.24    | 139 KB    | ##################################### | 100%
bob.blitz-2.0.11     | 2.4 MB    | ##################################### | 100%
numpy-1.11.0         | 6.8 MB    | ##################################### | 100%
bob.extension-2.3.7  | 317 KB    | ##################################### | 100%
boost-1.61.0         | 17.7 MB   | ##################################### | 100%
bob.learn.activation | 1.2 MB    | ##################################### | 100%
bob.sp-2.0.7         | 2.8 MB    | ##################################### | 100%
bob.learn.em-2.0.11  | 8.3 MB    | ##################################### | 100%
bob.core-2.1.6       | 3.6 MB    | ##################################### | 100%
openssl-1.1.1k       | 2.1 MB    | ##################################### | 100%
icu-56.1             | 21.9 MB   | ##################################### | 100%
bob.math-2.0.6       | 1.9 MB    | ##################################### | 100%
hdf5-1.8.17          | 4.0 MB    | ##################################### | 100%
libblitz-0.10        | 169 KB    | ##################################### | 100%
bob.learn.linear-2.0 | 2.1 MB    | ##################################### | 100%
bob.io.base-2.0.12   | 2.6 MB    | ##################################### | 100%
libgfortran-3.0.0    | 281 KB    | ##################################### | 100%
blas-1.1             | 1 KB      | ##################################### | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
(py35) root@fe1d92faab62:/# python
Python 3.5.6 |Anaconda, Inc.| (default, Jun  4 2021, 13:57:47)
[GCC 7.5.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import bob.learn.em
>>>