问题描述
我正在尝试使用 conda 安装 unrar,但没有成功。我之前安装了其他软件包,没有任何问题。
这是我使用的命令:
user: conda activate username
user: conda install unrar
导致以下输出:
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:
- unrar
Current channels:
- https://repo.anaconda.com/pkgs/main/linux-64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/r/linux-64
- https://repo.anaconda.com/pkgs/r/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.org 上查找了该软件包,但没有找到。我还尝试按照有关类似问题的帖子中的说明使用命令 conda install -c conda-forge unrar
。没用。
有人知道如何解决这个问题吗?
解决方法
该软件包似乎无法使用 conda 进行安装,但您可以使用 pip 进行安装,根据 https://github.com/matiasb/python-unrar:
pip install unrar
如果您的环境中尚未安装 pip,请执行 conda install pip
,然后使用 pip 安装 unrar。