简体   繁体   English

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

[英]conda-forge can't install pwntools due to UnsatisfiableError

I created a new Conda Env with:我创建了一个新的 Conda Env:

conda create -n my_env pip python=3.8.8

then, activate my env with然后,激活我的环境

conda activate my_env

then, as stated in anaconda docs ( here ) tried to install pwntools with:然后,如 anaconda 文档(此处)中所述,尝试使用以下命令安装 pwntools:

conda install -c conda-forge pwntools

I got this error message:我收到此错误消息:

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

My current specs:我目前的规格:

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 is already in the channel. conda-forge 已经在频道中了。

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

This is a detail of my env (conda list)这是我的 env(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

I am not really getting the meaning of this error and, since I don't want any env error to bite me in the back in the next six months due to a bad workaround, I prefer to ask for some advice.我并没有真正理解这个错误的含义,并且由于我不希望任何环境错误在接下来的六个月内由于糟糕的解决方法而让我陷入困境,我更愿意寻求一些建议。

Apparently this error is quite unfrequent (I already asked pwntools discord channel for help).显然这个错误并不常见(我已经向 pwntools discord 频道寻求帮助)。

May someone help me understanding the meaning of the error, and a viable workaround?有人可以帮助我理解错误的含义以及可行的解决方法吗?

thanks!谢谢!

Using mamba , the issue is more clear (I have added pwntools to the environment creation line:使用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

So the problem is that dependencies of pwntools are not available on windows from any configured channels.所以问题是pwntools依赖项在 Windows 上从任何配置的通道都不可用。 In this specific case, you are unfortunately out of luck installing from conda, as don't know of any channel that provides ncurses on windows.在这种特定情况下,不幸的是,您无法从 conda 安装,因为不知道任何在 Windows 上提供ncurses频道。

You might be able to get it working using pip, at least I was able to do你也许可以使用 pip 让它工作,至少我能够做到

 pip install pwntools

after creating the environment创建环境后

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM