pythonanacondacondaconda-forgepwntools

conda-forge can't install pwntools due to UnsatisfiableError


I created a new Conda Env with:

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:

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' already in 'channels' list,

This is a detail of my env (conda list)

# 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).

May someone help me understanding the meaning of the error, and a viable workaround?

thanks!


Solution

  • Using mamba, the issue is more clear (I have added pwntools to the environment creation line:

    (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. 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.

    You might be able to get it working using pip, at least I was able to do

     pip install pwntools
    

    after creating the environment