由于 UnsatisfiableError,conda-forge 无法安装 pwntools

conda-forge can't install pwntools due to UnsatisfiableError

我创建了一个新的 Conda Env:

conda create -n my_env pip python=3.8.8

然后,用

激活我的环境
conda activate my_env

然后,如 anaconda 文档 (here) 中所述,尝试使用以下命令安装 pwntools:

conda install -c conda-forge pwntools

我收到此错误消息:

D:\>conda install -c conda-forge pwntools
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.
Examining @/win-64::__win==0=0:  75%|███████████████████████████████████████             | 3/4 [00:00<00:00, 16.00it/s]-failed

UnsatisfiableError: The following specifications were found to be incompatible with each other:

Output in format: Requested package -> Available versions

我目前的规格:

conda version : 4.10.3
conda-build version : 3.21.4
python version : 3.8.8.final.0
virtual packages : __win=0=0
                   __archspec=1=x86_64
platform : win-64
user-agent : conda/4.10.3 requests/2.25.1 CPython/3.8.8 Windows/10 Windows/10.0.19041

conda-forge 已经在频道中了。

'conda-forge' already in 'channels' list,

这是我的环境(conda 列表)的详细信息

# Name                    Version                   Build  Channel
ca-certificates           2021.9.30            haa95532_1
certifi                   2021.10.8        py38haa95532_0
openssl                   1.1.1l               h2bbff1b_0
pip                       21.0.1           py38haa95532_0
python                    3.8.8                hdbf39b2_5
setuptools                58.0.4           py38haa95532_0
sqlite                    3.36.0               h2bbff1b_0
vc                        14.2                 h21ff451_1
vs2015_runtime            14.27.29016          h5e58377_2
wheel                     0.37.0             pyhd3eb1b0_1
wincertstore              0.2              py38haa95532_2

我并没有真正理解这个错误的含义,并且由于我不希望任何环境错误在接下来的六个月内由于糟糕的解决方法而在后面咬我,我更愿意寻求一些建议.

显然这个错误很少见(我已经向 pwntools discord 频道寻求帮助)。

有人可以帮助我理解错误的含义以及可行的解决方法吗?

谢谢!

使用mamba,问题更清楚(我在环境创建行中添加了pwntools:

(base) C:\Users\FlyingTeller>mamba create -n my_env -c conda-forge pip python=3.8.8 pwntools
                  __    __    __    __
                 /  \  /  \  /  \  /  \
                /    \/    \/    \/    \
███████████████/  /██/  /██/  /██/  /████████████████████████
              /  / \   / \   / \   / \  \____
             /  /   \_/   \_/   \_/   \    o \__,
            / _/                       \_____/  `
            |/
        ███╗   ███╗ █████╗ ███╗   ███╗██████╗  █████╗
        ████╗ ████║██╔══██╗████╗ ████║██╔══██╗██╔══██╗
        ██╔████╔██║███████║██╔████╔██║██████╔╝███████║
        ██║╚██╔╝██║██╔══██║██║╚██╔╝██║██╔══██╗██╔══██║
        ██║ ╚═╝ ██║██║  ██║██║ ╚═╝ ██║██████╔╝██║  ██║
        ╚═╝     ╚═╝╚═╝  ╚═╝╚═╝     ╚═╝╚═════╝ ╚═╝  ╚═╝

        mamba (0.16.0) supported by @QuantStack

        GitHub:  https://github.com/mamba-org/mamba
        Twitter: https://twitter.com/QuantStack

█████████████████████████████████████████████████████████████

WARNING: A directory already exists at the target location 'C:\Users\FlyingTeller\miniconda3\envs\my_env'
but it is not a conda environment.
Continue creating environment (y/[n])? y


Looking for: ['pip', 'python=3.8.8', 'pwntools']

conda-forge/win-64       Using cache
conda-forge/noarch       Using cache
pkgs/r/noarch            [====================] (00m:00s) No change
pkgs/msys2/win-64        [====================] (00m:00s) No change
pkgs/main/win-64         [====================] (00m:00s) No change
pkgs/main/noarch         [====================] (00m:00s) No change
pkgs/r/win-64            [====================] (00m:00s) No change
pkgs/msys2/noarch        [====================] (00m:00s) No change
Encountered problems while solving:
  - nothing provides ncurses needed by pwntools-4.3.1-pyh44b312d_0

所以问题是 pwntools 的依赖项在 windows 上无法从任何配置的渠道获得。在这种特定情况下,不幸的是,您从 conda 安装时运气不佳,因为不知道在 windows.

上提供 ncurses 的任何频道

你也许可以使用 pip 让它工作,至少我可以做到

 pip install pwntools

创建环境后