gpt4 book ai didi

build - 构建 conda 配方时如何修复 conda "ResolvePackageNotFound"

转载 作者:行者123 更新时间:2023-12-05 00:58:48 26 4
gpt4 key购买 nike

我从 github 下载了一个 conda 包以进行一些修改,并想在 conda 环境中构建这个本地包并测试我的更改。问题是配方的构建失败,因为 conda 有一个 conda.exceptions.ResolvePackageNotFound 错误,指出它没有检测到 2 个包,snakemakefuzzywuzzy

这是 meta.yaml 文件:

package:
name: snakepipes
version: 1.2.1

source:
path: ../

build:
number: 0
noarch: python

requirements:
build:
- python >=3

run:
- python >=3
- pandas
- graphviz
- pyyaml >=5.1
- wget
- snakemake >=5.2.3
- fuzzywuzzy

test:
commands:
- DNA-mapping --help

about:
home: 'https://snakepipes.readthedocs.org'
license: GPL3
summary: NGS processing pipelines from the MPI-IE
license_file: LICENSE.txt

我尝试将 noarch 更改为“generic”,在 requirements: build 类别中添加“pip”...

我的命令行很标准:conda build conda-recipe/.

我得到的错误信息总是一样的:

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
Adding in variants from internal_defaults
INFO:conda_build.variants:Adding in variants from internal_defaults
Attempting to finalize metadata for snakepipes
INFO:conda_build.metadata:Attempting to finalize metadata for snakepipes
Collecting package metadata: ...working... done
Solving environment: ...working... done
BUILD START: ['snakepipes-1.2.1-py_0.tar.bz2']
Collecting package metadata: ...working... done
Solving environment: ...working... done
Collecting package metadata: ...working... done
Solving environment: ...working... failed

Leaving build/test directories:
Work:
/home/remi/anaconda3/conda-bld/work
Test:
/home/remi/anaconda3/conda-bld/test_tmp
Leaving build/test environments:
Test:
source activate /home/remi/anaconda3/conda-bld/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_plac
Build:
source activate /home/remi/anaconda3/conda-bld/_build_env


Traceback (most recent call last):
File "/home/remi/anaconda3/lib/python3.7/site-packages/conda_build/environ.py", line 753, in get_install_actions
actions = install_actions(prefix, index, specs, force=True)
File "/home/remi/anaconda3/lib/python3.7/site-packages/conda/common/io.py", line 88, in decorated
return f(*args, **kwds)
File "/home/remi/anaconda3/lib/python3.7/site-packages/conda/plan.py", line 473, in install_actions
txn = solver.solve_for_transaction(prune=prune, ignore_pinned=not pinned)
File "/home/remi/anaconda3/lib/python3.7/site-packages/conda/core/solve.py", line 107, in solve_for_transaction
force_remove, force_reinstall)
File "/home/remi/anaconda3/lib/python3.7/site-packages/conda/core/solve.py", line 145, in solve_for_diff
force_remove)
File "/home/remi/anaconda3/lib/python3.7/site-packages/conda/core/solve.py", line 242, in solve_final_state
ssc = self._run_sat(ssc)
File "/home/remi/anaconda3/lib/python3.7/site-packages/conda/common/io.py", line 88, in decorated
return f(*args, **kwds)
File "/home/remi/anaconda3/lib/python3.7/site-packages/conda/core/solve.py", line 475, in _run_sat
conflicting_specs = ssc.r.get_conflicting_specs(tuple(final_environment_specs))
File "/home/remi/anaconda3/lib/python3.7/site-packages/conda/resolve.py", line 852, in get_conflicting_specs
reduced_index = self.get_reduced_index(specs)
File "/home/remi/anaconda3/lib/python3.7/site-packages/conda/common/io.py", line 88, in decorated
return f(*args, **kwds)
File "/home/remi/anaconda3/lib/python3.7/site-packages/conda/resolve.py", line 356, in get_reduced_index
specs, features = self.verify_specs(specs)
File "/home/remi/anaconda3/lib/python3.7/site-packages/conda/resolve.py", line 244, in verify_specs
raise ResolvePackageNotFound(bad_deps)
conda.exceptions.ResolvePackageNotFound:
- fuzzywuzzy
- snakemake[version='>=5.2.3']

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/remi/anaconda3/bin/conda-build", line 11, in <module>
sys.exit(main())
File "/home/remi/anaconda3/lib/python3.7/site-packages/conda_build/cli/main_build.py", line 456, in main
execute(sys.argv[1:])
File "/home/remi/anaconda3/lib/python3.7/site-packages/conda_build/cli/main_build.py", line 447, in execute
verify=args.verify, variants=args.variants)
File "/home/remi/anaconda3/lib/python3.7/site-packages/conda_build/api.py", line 208, in build
notest=notest, need_source_download=need_source_download, variants=variants)
File "/home/remi/anaconda3/lib/python3.7/site-packages/conda_build/build.py", line 2314, in build_tree
notest=notest,
File "/home/remi/anaconda3/lib/python3.7/site-packages/conda_build/build.py", line 1397, in build
create_build_envs(m, notest)
File "/home/remi/anaconda3/lib/python3.7/site-packages/conda_build/build.py", line 1281, in create_build_envs
raise e
File "/home/remi/anaconda3/lib/python3.7/site-packages/conda_build/build.py", line 1271, in create_build_envs
channel_urls=tuple(m.config.channel_urls))
File "/home/remi/anaconda3/lib/python3.7/site-packages/conda_build/environ.py", line 755, in get_install_actions
raise DependencyNeedsBuildingError(exc, subdir=subdir)
conda_build.exceptions.DependencyNeedsBuildingError: Unsatisfiable dependencies for platform linux-64: {"snakemake[version='>=5.2.3']", 'fuzzywuzzy'}

你知道如何解决这个问题吗?

最佳答案

问题是您需要添加具有适当包的 conda channel 。您可以搜索 https://anaconda.org对于拥有您需要的软件包的 channel 。

在这种情况下,似乎 bioconda 有 snakemake 包,而 conda-forge 有 fuzzywuzzy 所以你应该可以这样做

conda build -c conda-forge -c bioconda conda-recipe/

关于build - 构建 conda 配方时如何修复 conda "ResolvePackageNotFound",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56474234/

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