繁体   English   中英

conda 构建错误:找不到与 pytest-runner 匹配的分布

conda build ERROR: No matching distribution found for pytest-runner

提示:本站收集StackOverFlow近2千万问答,支持中英文搜索,鼠标放在语句上弹窗显示对应的参考中文或英文, 本站还提供   中文繁体   英文版本   中英对照 版本,有任何建议请联系yoyou2525@163.com。

这里有我的代码。 我定期将它上传到PIPanaconda 但是,由于我将此行添加到setup.py conda 未编译。

所以 PIP 工作得很好,像往常一样,我做python setup.py sdist并且像魅力一样工作。 但是,当我执行conda build . 它有错误:

ERROR: Could not find a version that satisfies the requirement pytest-runner
ERROR: No matching distribution found for pytest-runner

我在整个网络上都看到了这个错误,但通常这是用于安装而不是上传。 此外,解决方案似乎只是安装库,但在我的情况下已经安装:

$ conda install -c anaconda pytest-runner
Collecting package metadata (current_repodata.json): done
Solving environment: done

# All requested packages already installed.

完整信息:

$ conda build .
No numpy version specified in conda_build_config.yaml.  Falling back to default numpy value of 1.11
WARNING:conda_build.metadata:No numpy version specified in conda_build_config.yaml.  Falling back to default numpy value of 1.11
Copying /home/barrachina/Documents/cvnn to /home/barrachina/anaconda3/conda-bld/cvnn_1611601240565/work/
Adding in variants from internal_defaults
INFO:conda_build.variants:Adding in variants from internal_defaults
Attempting to finalize metadata for cvnn
INFO:conda_build.metadata:Attempting to finalize metadata for cvnn
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working... done
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working... done
BUILD START: ['cvnn-1.0.4-py_0.tar.bz2']
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working... done

## Package Plan ##

  environment location: /home/barrachina/anaconda3/conda-bld/cvnn_1611601240565/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl


The following NEW packages will be INSTALLED:

    _libgcc_mutex:    0.1-conda_forge          conda-forge
    _openmp_mutex:    4.5-1_gnu                conda-forge
    ca-certificates:  2020.12.5-ha878542_0     conda-forge
    certifi:          2020.12.5-py37h89c1867_1 conda-forge
    ld_impl_linux-64: 2.35.1-hea4e1c9_1        conda-forge
    libffi:           3.3-h58526e2_2           conda-forge
    libgcc-ng:        9.3.0-h2828fa1_18        conda-forge
    libgomp:          9.3.0-h2828fa1_18        conda-forge
    libstdcxx-ng:     9.3.0-h6de172a_18        conda-forge
    ncurses:          6.2-h58526e2_4           conda-forge
    openssl:          1.1.1i-h7f98852_0        conda-forge
    pip:              21.0-pyhd8ed1ab_0        conda-forge
    python:           3.7.9-hffdb5ce_0_cpython conda-forge
    python_abi:       3.7-1_cp37m              conda-forge
    readline:         8.0-he28a2e2_2           conda-forge
    setuptools:       49.6.0-py37h89c1867_3    conda-forge
    sqlite:           3.34.0-h74cdb3f_0        conda-forge
    tk:               8.6.10-h21135ba_1        conda-forge
    wheel:            0.36.2-pyhd3deb0d_0      conda-forge
    xz:               5.2.5-h516909a_1         conda-forge
    zlib:             1.2.11-h516909a_1010     conda-forge

Preparing transaction: ...working... done
Verifying transaction: ...working... done
Executing transaction: ...working... done
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working... done
source tree in: /home/barrachina/anaconda3/conda-bld/cvnn_1611601240565/work
export PREFIX=/home/barrachina/anaconda3/conda-bld/cvnn_1611601240565/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl
export BUILD_PREFIX=/home/barrachina/anaconda3/conda-bld/cvnn_1611601240565/_build_env
export SRC_DIR=/home/barrachina/anaconda3/conda-bld/cvnn_1611601240565/work
Using pip 21.0 from $PREFIX/lib/python3.7/site-packages/pip (python 3.7)
Non-user install because user site-packages disabled
Ignoring indexes: https://pypi.org/simple
Created temporary directory: /tmp/pip-ephem-wheel-cache-aiaii66z
Created temporary directory: /tmp/pip-req-tracker-btl00fiq
Initialized build tracking at /tmp/pip-req-tracker-btl00fiq
Created build tracker: /tmp/pip-req-tracker-btl00fiq
Entered build tracker: /tmp/pip-req-tracker-btl00fiq
Created temporary directory: /tmp/pip-install-vgiz8uiu
Processing $SRC_DIR
  Created temporary directory: /tmp/pip-req-build-spp5p5g1
  Added file://$SRC_DIR to build tracker '/tmp/pip-req-tracker-btl00fiq'
    Running setup.py (path:/tmp/pip-req-build-spp5p5g1/setup.py) egg_info for package from file://$SRC_DIR
    Created temporary directory: /tmp/pip-pip-egg-info-3kcdcujb
    Running command python setup.py egg_info
    ERROR: Could not find a version that satisfies the requirement pytest-runner
    ERROR: No matching distribution found for pytest-runner
    Traceback (most recent call last):
      File "/home/barrachina/anaconda3/conda-bld/cvnn_1611601240565/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/lib/python3.7/site-packages/setuptools/installer.py", line 128, in fetch_build_egg
        subprocess.check_call(cmd)
      File "/home/barrachina/anaconda3/conda-bld/cvnn_1611601240565/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/lib/python3.7/subprocess.py", line 363, in check_call
        raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command '['/home/barrachina/anaconda3/conda-bld/cvnn_1611601240565/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/bin/python', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmpu1njeuz9', '--quiet', 'pytest-runner']' returned non-zero exit status 1.

    The above exception was the direct cause of the following exception:

    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-req-build-spp5p5g1/setup.py", line 40, in <module>
        'full': ['prettytable', 'matplotlib', 'seaborn', 'plotly', 'tikzplotlib']
      File "/home/barrachina/anaconda3/conda-bld/cvnn_1611601240565/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/lib/python3.7/site-packages/setuptools/__init__.py", line 162, in setup
        _install_setup_requires(attrs)
      File "/home/barrachina/anaconda3/conda-bld/cvnn_1611601240565/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/lib/python3.7/site-packages/setuptools/__init__.py", line 157, in _install_setup_requires
        dist.fetch_build_eggs(dist.setup_requires)
      File "/home/barrachina/anaconda3/conda-bld/cvnn_1611601240565/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/lib/python3.7/site-packages/setuptools/dist.py", line 702, in fetch_build_eggs
        replace_conflicting=True,
      File "/home/barrachina/anaconda3/conda-bld/cvnn_1611601240565/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/lib/python3.7/site-packages/pkg_resources/__init__.py", line 781, in resolve
        replace_conflicting=replace_conflicting
      File "/home/barrachina/anaconda3/conda-bld/cvnn_1611601240565/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1064, in best_match
        return self.obtain(req, installer)
      File "/home/barrachina/anaconda3/conda-bld/cvnn_1611601240565/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1076, in obtain
        return installer(requirement)
      File "/home/barrachina/anaconda3/conda-bld/cvnn_1611601240565/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/lib/python3.7/site-packages/setuptools/dist.py", line 758, in fetch_build_egg
        return fetch_build_egg(self, req)
      File "/home/barrachina/anaconda3/conda-bld/cvnn_1611601240565/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/lib/python3.7/site-packages/setuptools/installer.py", line 130, in fetch_build_egg
        raise DistutilsError(str(e)) from e
    distutils.errors.DistutilsError: Command '['/home/barrachina/anaconda3/conda-bld/cvnn_1611601240565/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/bin/python', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmpu1njeuz9', '--quiet', 'pytest-runner']' returned non-zero exit status 1.
WARNING: Discarding file:///home/barrachina/anaconda3/conda-bld/cvnn_1611601240565/work. Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Exception information:
Traceback (most recent call last):
  File "$PREFIX/lib/python3.7/site-packages/pip/_internal/cli/base_command.py", line 189, in _main
    status = self.run(options, args)
  File "$PREFIX/lib/python3.7/site-packages/pip/_internal/cli/req_command.py", line 178, in wrapper
    return func(self, options, args)
  File "$PREFIX/lib/python3.7/site-packages/pip/_internal/commands/install.py", line 317, in run
    reqs, check_supported_wheels=not options.target_dir
  File "$PREFIX/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 101, in resolve
    req, requested_extras=(),
  File "$PREFIX/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 319, in make_requirement_from_install_req
    raise self._build_failures[ireq.link]
  File "$PREFIX/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 167, in _make_candidate_from_link
    name=name, version=version,
  File "$PREFIX/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 306, in __init__
    version=version,
  File "$PREFIX/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 144, in __init__
    self.dist = self._prepare()
  File "$PREFIX/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 226, in _prepare
    dist = self._prepare_distribution()
  File "$PREFIX/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 312, in _prepare_distribution
    self._ireq, parallel_builds=True,
  File "$PREFIX/lib/python3.7/site-packages/pip/_internal/operations/prepare.py", line 457, in prepare_linked_requirement
    return self._prepare_linked_requirement(req, parallel_builds)
  File "$PREFIX/lib/python3.7/site-packages/pip/_internal/operations/prepare.py", line 501, in _prepare_linked_requirement
    req, self.req_tracker, self.finder, self.build_isolation,
  File "$PREFIX/lib/python3.7/site-packages/pip/_internal/operations/prepare.py", line 66, in _get_prepared_distribution
    abstract_dist.prepare_distribution_metadata(finder, build_isolation)
  File "$PREFIX/lib/python3.7/site-packages/pip/_internal/distributions/sdist.py", line 41, in prepare_distribution_metadata
    self.req.prepare_metadata()
  File "$PREFIX/lib/python3.7/site-packages/pip/_internal/req/req_install.py", line 549, in prepare_metadata
    self.metadata_directory = self._generate_metadata()
  File "$PREFIX/lib/python3.7/site-packages/pip/_internal/req/req_install.py", line 529, in _generate_metadata
    details=self.name or f"from {self.link}"
  File "$PREFIX/lib/python3.7/site-packages/pip/_internal/operations/build/metadata_legacy.py", line 73, in generate_metadata
    command_desc='python setup.py egg_info',
  File "$PREFIX/lib/python3.7/site-packages/pip/_internal/utils/subprocess.py", line 258, in call_subprocess
    raise InstallationSubprocessError(proc.returncode, command_desc)
pip._internal.exceptions.InstallationSubprocessError: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Removed file://$SRC_DIR from build tracker '/tmp/pip-req-tracker-btl00fiq'
Removed build tracker: '/tmp/pip-req-tracker-btl00fiq'
Traceback (most recent call last):
  File "/home/barrachina/anaconda3/bin/conda-build", line 11, in <module>
    sys.exit(main())
  File "/home/barrachina/anaconda3/lib/python3.7/site-packages/conda_build/cli/main_build.py", line 469, in main
    execute(sys.argv[1:])
  File "/home/barrachina/anaconda3/lib/python3.7/site-packages/conda_build/cli/main_build.py", line 460, in execute
    verify=args.verify, variants=args.variants)
  File "/home/barrachina/anaconda3/lib/python3.7/site-packages/conda_build/api.py", line 209, in build
    notest=notest, need_source_download=need_source_download, variants=variants)
  File "/home/barrachina/anaconda3/lib/python3.7/site-packages/conda_build/build.py", line 2344, in build_tree
    notest=notest,
  File "/home/barrachina/anaconda3/lib/python3.7/site-packages/conda_build/build.py", line 1492, in build
    cwd=src_dir, stats=build_stats)
  File "/home/barrachina/anaconda3/lib/python3.7/site-packages/conda_build/utils.py", line 398, in check_call_env
    return _func_defaulting_env_to_os_environ('call', *popenargs, **kwargs)
  File "/home/barrachina/anaconda3/lib/python3.7/site-packages/conda_build/utils.py", line 378, in _func_defaulting_env_to_os_environ
    raise subprocess.CalledProcessError(proc.returncode, _args)
subprocess.CalledProcessError: Command '['/bin/bash', '-o', 'errexit', '/home/barrachina/anaconda3/conda-bld/cvnn_1611601240565/work/conda_build.sh']' returned non-zero exit status 1.
1 个回复

我遇到了同样的问题ERROR: Could not find a version that satisfies the requirement pytest-runner构建noarch包时ERROR: Could not find a version that satisfies the requirement pytest-runner (注意:当使用特定的 Python 版本和 arch 而不是noarch ,它工作正常)。

像这样更改我的setup.py后:

setup(
    ...
    setup_requires=[],  # instead of: setup_requires=['pytest-runner'],

    ...
)

然后一切似乎都没有错误(并且测试仍在作为 conda 构建的一部分进行)。

1 pytest-runner 是做什么的?

我已经在 pytest 中编写了测试并使用 pytest 命令运行它们。 我正在查看其他 pytest 模块并遇到了 pytest-runner。 这究竟是做什么的? 模块描述如下,请解释... Setup scripts can use pytest-runner to add setup.p ...

3 Buildroot-安装“ pytest-runner”软件包失败

Buildroot版本:2017-02 我需要将python包'chardet'集成到我的构建中。 该chardet需要'pytest-runner'软件包。 情况1“ chardet”被标记为已集成到构建中。 在使用scanpypi脚本进行构建之前,尚未对'pytest-run ...

5 错误:找不到匹配的匹配分布

我想在我的python 2.6.6中安装pip,我有Oracle Linux 6 我按照此链接Link给出的答案 我下载了get-pip.py文件并运行以下命令 但是我收到以下错误 错误显示一些网络问题,但我在这里有完全开放的互联网访问。 我该如何安装pip? ...

6 错误:找不到构建输入文件:“/Users/GoogleService-Info.plist”(在项目“Runner”的目标“Runner”中)

我正在尝试采用 Flutter 项目的 iOS 版本。 无论我尝试什么,它都会给我以下错误: 错误:找不到构建输入文件:“/Users/GoogleService-Info.plist”(在项目“Runner”的目标“Runner”中) 这是我尝试使用以下命令进行构建的一组命令: 扑 ...

7 找不到匹配的 vtk 错误分布

我尝试使用 $pip install vtk 但遇到错误 [在此处输入图片描述][1] https://i.stack.imgur.com/piSTo.png “错误:找不到满足 vtk 要求的版本(来自版本:无)错误:找不到与 vtk 匹配的分发版” 我什么都试过了 1. 安装 32 位 ...

8 错误:找不到与重新匹配的分布

我正在尝试使用 Python 应用程序在 Cpanel 上运行 Python 脚本,当我在文本文件中添加所有模块并运行 pip install 时,我收到此错误。 错误:找不到满足重新要求的版本错误:找不到重新匹配的发行版 ...

9 错误:找不到与张量流匹配的分布

正如我已经看到许多关于安装 Tensorflow 问题的解决方案的帖子,我仍然无法让它工作。 我尝试了以下几行: pip install --upgrade tensorflow 结果: 错误:找不到满足张量流要求的版本(来自版本:无) 错误:找不到与张量流匹配的分布 我也试过: ...

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2022 STACKOOM.COM