Python 康达罐头';在pypi.org/simple上找不到包

Python 康达罐头';在pypi.org/simple上找不到包,python,anaconda,conda,Python,Anaconda,Conda,我在通过conda安装软件包时遇到问题。在简单频道中找不到任何软件包 返回: 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 F

我在通过conda安装软件包时遇到问题。在简单频道中找不到任何软件包

返回:

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
我已在浏览器中手动检查日志模块是否在第页的列表中。 hoever,看起来conda在中查找包,但是win-64目录不存在

conda config--show说,配置的通道是


有什么建议吗?

康达频道必须有一个特定的布局(win-64、win-32,…),并且包必须以康达特定的方式构建(请参阅)。这些包通常是针对特定的Python版本(尽管也应该有noarch包)和/或numpy版本以及不同的平台(windows、linux、mac 32位或64位)构建的

您不能使用
conda
直接从PyPI安装软件包,因为PyPI不符合conda通道的条件,即使是那些软件包,也不像conda软件包那样构建。但是您可以使用
pip
(在conda中)安装它们

但是:您可以检查您想要的包是否在conda一致的渠道中分发(目前是一个非常流行的渠道)。乍一看,有几个通道在anaconda cloud()中包含一个名为
logbook
的包

如果您找到了一个分发所需版本的软件包(并与所需的Python版本和平台相对)的渠道,那么只需使用:

conda install -c channel_name logbook

许多Python产品在Gohlke页面上可用于Windows

假设您在自己的环境(称为Py36)中安装了64位Py3.6,您可以这样做

从(或您需要的任何版本)下载日志-1.1.0-cp36-cp36m-win_amd64.whl

然后在命令提示下:

  • 激活要安装日志的conda环境
  • 使用
    pip
    安装您在该环境中下载的
    whl
  • 如果您愿意,请验证是否成功

yaml文件的内容

name: Py36
channels:
- defaults
dependencies:
- certifi=2017.11.5=py36hb8ac631_0
- pip=9.0.1=py36h226ae91_4
- python=3.6.3=h3b118a2_4
- setuptools=36.5.0=py36h65f9e6e_0
- vc=14=h2379b0c_2
- vs2015_runtime=14.0.25123=hd4c4e62_2
- wheel=0.30.0=py36h6c3ec14_1
- wincertstore=0.2=py36h7fe50ca_0
- pip:
  - beautifulsoup4==4.6.0
  - chardet==3.0.4
  - idna==2.6
  - logbook==1.1.0
  - opencv-python==3.4.0+contrib
  - requests==2.18.4
  - urllib3==1.22
  - wikipedia==1.4.0
prefix: C:\ProgramData\Miniconda3\envs\Py36

您确定
pypi.org/simple
符合康达频道的资格吗?我严重怀疑这一点,错误消息似乎表明并非如此。请原谅我自己的无知,但是在Conda下是否有一个特定的Python环境,您希望在其中安装日志?谢谢。我知道我可以通过pip安装它,但我希望将来将包复制到生产环境中。pip安装的包也会通过命令conda env export-n myenv-f myenv.yml导出吗?要由conda env create-f myenv.yml在生产中导入吗?奇怪的是,conda能够在一个新的环境中重新建立一切,包括日志,除了opencv!很高兴知道,当预构建的conda软件包不可用时,它是conda的替代品。非常感谢。
conda install -c channel_name logbook
C:\scratch>activate Py36

(Py36) C:\scratch>pip install Logbook-1.1.0-cp36-cp36m-win_amd64.whl
Processing c:\scratch\logbook-1.1.0-cp36-cp36m-win_amd64.whl
Installing collected packages: Logbook
Successfully installed Logbook-1.1.0

(Py36) C:\scratch>conda list
# packages in environment at C:\ProgramData\Miniconda3\envs\Py36:
#
beautifulsoup4            4.6.0                     <pip>
certifi                   2017.11.5        py36hb8ac631_0
chardet                   3.0.4                     <pip>
idna                      2.6                       <pip>
Logbook                   1.1.0                     <pip>
opencv-python             3.4.0+contrib             <pip>
pip                       9.0.1            py36h226ae91_4
python                    3.6.3                h3b118a2_4
requests                  2.18.4                    <pip>
setuptools                36.5.0           py36h65f9e6e_0
urllib3                   1.22                      <pip>
vc                        14                   h2379b0c_2
vs2015_runtime            14.0.25123           hd4c4e62_2
wheel                     0.30.0           py36h6c3ec14_1
wikipedia                 1.4.0                     <pip>
wincertstore              0.2              py36h7fe50ca_0
conda env export -n Py36 -f Py36.yml
name: Py36
channels:
- defaults
dependencies:
- certifi=2017.11.5=py36hb8ac631_0
- pip=9.0.1=py36h226ae91_4
- python=3.6.3=h3b118a2_4
- setuptools=36.5.0=py36h65f9e6e_0
- vc=14=h2379b0c_2
- vs2015_runtime=14.0.25123=hd4c4e62_2
- wheel=0.30.0=py36h6c3ec14_1
- wincertstore=0.2=py36h7fe50ca_0
- pip:
  - beautifulsoup4==4.6.0
  - chardet==3.0.4
  - idna==2.6
  - logbook==1.1.0
  - opencv-python==3.4.0+contrib
  - requests==2.18.4
  - urllib3==1.22
  - wikipedia==1.4.0
prefix: C:\ProgramData\Miniconda3\envs\Py36