在当前通道中找不到时,如何在conda env(运行3.6)中安装特定的awscli版本

2024-09-21 01:29:47 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在尝试在我的conda环境(运行python3.6)中安装awscli的特定版本。正如另一篇文章中所建议的,我已经尝试将conda-forge添加到我当前的频道中。在

当我运行命令conda install -p /Users/myname/anaconda3/envs/py36 awscli==1.11.156 -y

此消息出错:

Solving environment: failed

PackagesNotFoundError: The following packages are not available from current channels:

  - awscli==1.11.156

Current channels:

  - https://repo.continuum.io/pkgs/main/osx-64
  - https://repo.continuum.io/pkgs/main/noarch
  - https://repo.continuum.io/pkgs/free/osx-64
  - https://repo.continuum.io/pkgs/free/noarch
  - https://repo.continuum.io/pkgs/r/osx-64
  - https://repo.continuum.io/pkgs/r/noarch
  - https://repo.continuum.io/pkgs/pro/osx-64
  - https://repo.continuum.io/pkgs/pro/noarch
  - https://conda.anaconda.org/conda-forge/osx-64
  - https://conda.anaconda.org/conda-forge/noarch

Tags: httpsiofreemainrepoanacondacondapro
1条回答
网友
1楼 · 发布于 2024-09-21 01:29:47

引用杰克·范德普拉斯的话:

If all you are doing is installing Python packages within an isolated environment, conda and pip+virtualenv are mostly interchangeable, modulo some difference in dependency handling and package availability. By isolated environment I mean a conda-env or virtualenv, in which you can install packages without modifying your system Python installation.

您可以尝试激活虚拟环境,然后使用任何标准方法进行安装。假设您已经创建了一个名为py36的conda虚拟环境:

$ source activate py36

或者在窗户上

^{pr2}$

然后只需使用任何标准安装方法,例如:

$ pip install awscli==1.11.156

$ easy_install https://github.com/aws/aws-cli/archive/1.11.156.tar.gz

缺点是conda没有管理使用pip安装的包的依赖关系,但在大多数情况下它是可以的。在

相关问题 更多 >

    热门问题