因为要用到lifelines 包,在cmd中使用conda install lifelines ,显示如下错误:
PackagesNotFoundError: The following packages are not available from current channels:
- lifelines
Current channels:
- https://conda.anaconda.org/derickl/win-64
- https://conda.anaconda.org/derickl/noarch
- https://repo.anaconda.com/pkgs/main/win-64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/free/win-64
- https://repo.anaconda.com/pkgs/free/noarch
- https://repo.anaconda.com/pkgs/r/win-64
- https://repo.anaconda.com/pkgs/r/noarch
- https://repo.anaconda.com/pkgs/msys2/win-64
- https://repo.anaconda.com/pkgs/msys2/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 search -t conda lifelines,这样子就会显示可用的版本 ,我的显示效果如下所示:
选择适合自己的版本,比如,我选择的就是conda-forge/lifelines,在命令行中输入:
conda install -c https://conda.anaconda.org/conda-forge lifelines, 注意conda-forge和lifelines之间没有“/”。