python - Conda 找不到要安装的本地包,尽管它存在于环境的 conda-bld 目录中

标签 python anaconda conda packaging miniconda

我使用 conda-build 从 PyPI 包构建了一个 conda 包。

$ cd
$ conda skeleton pypi climate_indices
$ ll climate_indices/
total 6
-rw-r--r-- 1 DELL 197121  107 Sep 10 10:02 bld.bat
-rw-r--r-- 1 DELL 197121   81 Sep 10 10:02 build1.sh
-rw-r--r-- 1 DELL 197121 1088 Sep  9 15:29 meta.yaml
$ conda-build climate_indices
$ ls -l /c/home/miniconda3/envs/packaging/conda-bld/win-64/
total 73
-rw-r--r-- 1 DELL 197121 58736 Sep 10 13:11 climate_indices-1.0.0-py37h39e3cac_0.tar.bz2
-rw-r--r-- 1 DELL 197121  2091 Sep 10 13:11 index.html
-rw-r--r-- 1 DELL 197121   707 Sep 10 13:11 repodata.json
-rw-r--r-- 1 DELL 197121   417 Sep 10 13:11 repodata.json.bz2
-rw-r--r-- 1 DELL 197121   825 Sep 10 13:11 repodata2.json

我接下来尝试将其安装到环境中,但此步骤失败:

$ conda install --use-local climate_indices
Solving environment: ...working... failed

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

  - climate_indices

Current channels:

  - 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/pro/win-64
  - https://repo.anaconda.com/pkgs/pro/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.

在我看来,它可能忽略了 --use-local 选项。为什么这不能按我的预期工作(即如here所述)?

最佳答案

我今天也遇到了同样的问题。我通过添加 --offline

修复了(?)
conda install --use-local  --offline  mypackae

关于python - Conda 找不到要安装的本地包,尽管它存在于环境的 conda-bld 目录中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52263338/

上一篇:WPF滑动面板

下一篇:基于XSD的WPF表单

相关文章:

python - c++ STL - 手动使用标准 gdb pretty-print

python - 如何每隔第 n 个索引将一个字符串插入到 numpy 列表中?

python - Ipython %matplotlib 给出 "ImportError: No module named moves"尽管通过 pip 安装了移动

python - 从 xlwings 调用时 Pycharm 中的断点

python - 强制 conda 环境中的 rpy2 使用 conda 环境之外的 R

ubuntu - 在 ubuntu 中复制 anaconda 环境的问题

python - 容器内 conda 的目的是什么?

python - 为什么我画图遇到除零错误?

python - 在c中嵌入Python,然后在c++程序中运行它不起作用

python - anaconda环境无法安装kenlm包