gpt4 book ai didi

python - 畅达构建错误 : No matching distribution found for pytest-runner

转载 作者:行者123 更新时间:2023-12-05 06:52:52 28 4
gpt4 key购买 nike

我有我的代码 here .我定期将其上传到PIPanaconda .但是,由于我添加了 this line 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.

最佳答案

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

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

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

...
)

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

关于python - 畅达构建错误 : No matching distribution found for pytest-runner,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65890962/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com