【发布时间】:2021-11-26 04:49:58
【问题描述】:
当我想在我的一个环境中安装 jupyter notebook 或 spyder 时,我遇到了这个错误:
PackagesNotFoundError: The following packages are not available from current channels:
- python=3.1
Current channels:
- https://repo.anaconda.com/pkgs/main/win-64
- https://repo.anaconda.com/pkgs/main/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
- https://conda.anaconda.org/conda-forge/win-64
- https://conda.anaconda.org/conda-forge/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.
为什么会这样?
编辑: 我使用 scikit-learn、pytorch 和 torchvision 创建了环境,但没有指定任何版本。创建环境后,我尝试使用两个命令安装 spyder:
conda install spyder
conda install -c anaconda spyder
都没有用。 好像我创建的时候环境自动使用了python=3.1。
编辑: 当我将所有内容放入一个 env.yml 文件而不是命令行时,它似乎可以工作。不知道为什么。
【问题讨论】:
-
你能告诉我你是如何安装这个的吗?具体怎么指定版本号?