我创建了一个新的Conda环境:
conda create -n my_env pip python=3.8.8
然后,用
激活我的envconda activate my_env
然后,如anaconda文档(这里)中所述,尝试使用:
安装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 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
我真的不明白这个错误的含义,因为我不想在接下来的六个月里因为一个糟糕的解决方案而让任何嫉妒错误咬我的背,我更愿意寻求一些建议。
显然这个错误是相当罕见的(我已经向pwntools discord频道寻求帮助)。
有人可以帮助我理解错误的含义,和一个可行的解决方案?
谢谢!
使用mamba
,问题更清楚(我已将pwntools添加到环境创建行:
(base) C:UsersFlyingTeller>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:UsersFlyingTellerminiconda3envsmy_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
的依赖关系在任何配置的通道上都不可用。在这个特定的情况下,你很不幸地没有从conda安装,因为不知道在windows上有任何提供ncurses
的通道。
你可以用pip让它工作,至少我能做到
pip install pwntools
创建环境后的