我使用 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/