Myk*_*Myk 3 python anaconda conda
我通过conda安装软件包时遇到问题。它在简单的https://pypi.org频道中找不到任何包。
conda install logbook
Run Code Online (Sandbox Code Playgroud)
返回:
PS C:\WINDOWS\system32> conda config --add channels
https://pypi.org/simple
Warning: 'https://pypi.org/simple' already in 'channels' list, moving to the top
PS C:\WINDOWS\system32> conda install Logbook
Fetching package metadata ....
WARNING: The remote server could not find the noarch directory for the
requested channel with url: https://pypi.org/simple
It is possible you have given conda an invalid channel. Please double-check
your conda configuration using `conda config --show`.
If the requested url is in fact a valid conda channel, please request that the
channel administrator create `noarch/repodata.json` and associated
`noarch/repodata.json.bz2` files, even if `noarch/repodata.json` is empty.
$ mkdir noarch
$ echo '{}' > noarch/repodata.json
$ bzip2 -k noarch/repodata.json
...........
PackageNotFoundError: Packages missing in current channels:
- logbook
We have searched for the packages in the following channels:
- https://pypi.org/simple/win-64
- https://pypi.org/simple/noarch
- https://repo.continuum.io/pkgs/main/win-64
- https://repo.continuum.io/pkgs/main/noarch
- https://repo.continuum.io/pkgs/free/win-64
- https://repo.continuum.io/pkgs/free/noarch
- https://repo.continuum.io/pkgs/r/win-64
- https://repo.continuum.io/pkgs/r/noarch
- https://repo.continuum.io/pkgs/pro/win-64
- https://repo.continuum.io/pkgs/pro/noarch
- https://repo.continuum.io/pkgs/msys2/win-64
- https://repo.continuum.io/pkgs/msys2/noarch
Run Code Online (Sandbox Code Playgroud)
我已经在浏览器中手动检查了日志模块是否在页面https://pypi.org/simple上的列表中。但是,似乎conda在https://pypi.org/simple/win-64中寻找软件包,但win-64目录不存在。
conda config --show表示,已配置的频道为https://pypi.org/simple
add_anaconda_token: True
add_pip_as_python_dependency: True
allow_non_channel_urls: True
allow_softlinks: False
always_copy: False
always_softlink: False
always_yes: False
anaconda_upload: None
auto_update_conda: True
changeps1: True
channel_alias: https://conda.anaconda.org
channel_priority: True
channels:
- https://pypi.org/simple
- https://pypi.org/simple/
- defaults
client_ssl_cert: None
client_ssl_cert_key: None
clobber: False
create_default_packages: []
custom_channels:
pkgs/main: https://repo.continuum.io/
pkgs/free: https://repo.continuum.io/
pkgs/r: https://repo.continuum.io/
pkgs/pro: https://repo.continuum.io/
pkgs/msys2: https://repo.continuum.io/
C:/Program%20Files/Anaconda3/conda-bld: file:///
Run Code Online (Sandbox Code Playgroud)
有什么建议吗?
conda通道必须具有特定的布局(win-64,win-32等),并且软件包必须以conda特定的方式构建(请参阅使用conda骨架构建conda软件包)。这些软件包通常针对特定的Python版本(尽管也应该有noarch软件包)和/或numpy版本针对不同的平台(Windows,Linux,Mac 32位或64位)构建。
您无法使用来直接从PyPI安装软件包,conda因为PyPI不符合conda-channel的资格,即使它是软件包,也无法像conda-packages那样构建。但是您可以使用pip(在conda中)安装它们。
但是:您可以检查所需的软件包是否在符合conda的渠道中分发(当前是一个非常受欢迎的渠道conda-forge)。乍看之下,几个渠道都包含一个logbook在蟒蛇云中命名的软件包(日志的搜索结果)。
如果您找到一个分发所需软件包版本的渠道(针对所需的Python版本和平台),则只需使用:
conda install -c channel_name logbook
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2644 次 |
| 最近记录: |