无法安装 kraken(图像优化器)

Unable to install kraken (image optimizer)

我想在我的蟒蛇中安装 kraken。所以我按照从 PyPI -

得到的命令
pip install kraken

但我最终遇到了一个错误,那就是 -

Collecting kraken
Using cached kraken-2.0.8-py3-none-any.whl (643 kB)
Collecting python-bidi
  Downloading python_bidi-0.4.2-py2.py3-none-any.whl (30 kB)
Collecting protobuf>=3.0.0
  Downloading protobuf-3.12.2-cp37-cp37m-win_amd64.whl (1.0 MB)
     |████████████████████████████████| 1.0 MB 30 kB/s
ERROR: Could not find a version that satisfies the requirement torch>=1.0.0 (from kraken) (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2)
ERROR: No matching distribution found for torch>=1.0.0 (from kraken)

我也试过 anaconda -

的指令
conda install -c bioconda kraken

但是这次我有 -

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:

    - kraken

Current channels:

    - https://conda.anaconda.org/bioconda/win-64
    - https://conda.anaconda.org/bioconda/noarch
    - https://repo.anaconda.com/pkgs/main/win-64
    - https://repo.anaconda.com/pkgs/main/noarch
    - https://repo.anaconda.com/pkgs/r/win-64
    - https://repo.anaconda.com/pkgs/r/noarch
    - https://repo.anaconda.com/pkgs/msys2/win-64
    - https://repo.anaconda.com/pkgs/msys2/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.

我遇到的所有这些命令都在 Anaconda Prompt 中。 所以请帮助我了解如何安装 kraken。 TIA.

The GitHub repository 有通过 Conda 安装的说明。它显示了创建一个新环境,这通常是一种很好的做法。

非CUDA版本

$ wget https://raw.githubusercontent.com/mittagessen/kraken/master/environment.yml
$ conda env create -f environment.yml

CUDA 版本

$ wget https://raw.githubusercontent.com/mittagessen/kraken/master/environment_cuda.yml
$ conda env create -f environment_cuda.yml

请注意,--name 标志可用于指定不同于默认名称 (kraken) 的环境名称。

在现有环境中安装

从技术上讲,也可以使用 YAML 安装到现有环境中。但是,由于它涉及基于 pip 的安装,因此不建议将其安装到 base env(参见 Using Pip in a Conda Environment)。

conda env update -n my_env -f environment.yml