【发布时间】:2018-09-10 18:13:44
【问题描述】:
我使用 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 所述)?
【问题讨论】:
-
您尝试安装的环境中的 Python 版本是什么?
-
Python 3.7 是环境使用的版本。
-
这是在 WSL 上吗? conda 安装在哪里?你用的是什么外壳?
-
Windows 10,Miniconda3,使用作为 Windows git 客户端的一部分提供的 bash shell 控制台,conda 与 Miniconda 的其余部分一起安装在 /c/home/miniconda3(或 C:/home/ miniconda3)
-
您可以尝试使用 Anaconda Prompt 来运行构建和安装吗?
标签: python anaconda conda packaging miniconda