我正在为一台计算机编写一些python脚本,由于各种原因,这些脚本停留在python v2.7.5上(升级不是一种选择)。
我想在桌面上设置一个conda环境,以在将脚本传输到生产机器之前对其进行测试。
$ conda create --name py275 python=2.7.5
Collecting package metadata (current_repodata.json): done
Solving environment: failed
Collecting package metadata (repodata.json): done
Solving environment: failed
PackagesNotFoundError: The following packages are not available from current channels:
- python=2.7.5
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.
当我执行conda search python
时,可以使用的最旧版本是2.7.13,但是如果我去anaconda.org进行搜索,则files for python 2.7.5就在其中,并且它们似乎位于主要渠道。
如何将conda指向这些文件以允许我创建合适的环境?
答案 0 :(得分:1)
经过漫长的努力寻找答案之后,我在这里发布后找到了答案。 Python在anaconda
通道中,而不在main
通道中。
$ conda create --name py275 -c anaconda python=2.7.5