Nbdev_conda error

Continuing the discussion from Share your nbdev project :scroll::

I followed the (updated) instructions in the walk-through. Here’s the error output, from the command run immediately after a successful run of nbdev_pypi. As I look at it now, it seems likely to be a conda issue rather than an nbdev issue. So I’ll look into that side of things next. But any advice would be most welcome.

View at:
https://pypi.org/project/nbstata/0.3.7/
(nbdev) ~/nbstata$ nbdev_conda
conda build --output-folder out --no-anaconda-upload  nbstata
No numpy version specified in conda_build_config.yaml.  Falling back to default numpy value of 1.16
WARNING:conda_build.metadata:No numpy version specified in conda_build_config.yaml.  Falling back to default numpy value of 1.16
INFO:conda_build.variants:Adding in variants from internal_defaults
Adding in variants from internal_defaults
INFO:conda_build.metadata:Attempting to finalize metadata for nbstata
Attempting to finalize metadata for nbstata
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working... failed
Traceback (most recent call last):
  File "/home/thuegerich/miniconda3/envs/nbdev/lib/python3.10/site-packages/conda_build/environ.py", line 797, in get_install_actions

Leaving build/test directories:
  Work:
 /home/thuegerich/miniconda3/envs/nbdev/conda-bld/work
  Test:
 /home/thuegerich/miniconda3/envs/nbdev/conda-bld/test_tmp
Leaving build/test environments:
  Test:
source activate  /home/thuegerich/miniconda3/envs/nbdev/conda-bld/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_plac
  Build:
source activate  /home/thuegerich/miniconda3/envs/nbdev/conda-bld/_build_env


    actions = install_actions(prefix, index, specs, force=True)
  File "/home/thuegerich/miniconda3/envs/nbdev/lib/python3.10/site-packages/conda/common/io.py", line 86, in decorated
    return f(*args, **kwds)
  File "/home/thuegerich/miniconda3/envs/nbdev/lib/python3.10/site-packages/conda/plan.py", line 476, in install_actions    txn = solver.solve_for_transaction(prune=prune, ignore_pinned=not pinned)
  File "/home/thuegerich/miniconda3/envs/nbdev/lib/python3.10/site-packages/conda/core/solve.py", line 156, in solve_for_transaction
    unlink_precs, link_precs = self.solve_for_diff(update_modifier, deps_modifier,
  File "/home/thuegerich/miniconda3/envs/nbdev/lib/python3.10/site-packages/conda/core/solve.py", line 199, in solve_for_diff
    final_precs = self.solve_final_state(update_modifier, deps_modifier, prune, ignore_pinned,
  File "/home/thuegerich/miniconda3/envs/nbdev/lib/python3.10/site-packages/conda/core/solve.py", line 317, in solve_final_state
    ssc = self._add_specs(ssc)
  File "/home/thuegerich/miniconda3/envs/nbdev/lib/python3.10/site-packages/conda/core/solve.py", line 607, in _add_specs
    explicit_pool = ssc.r._get_package_pool(self.specs_to_add)
  File "/home/thuegerich/miniconda3/envs/nbdev/lib/python3.10/site-packages/conda/resolve.py", line 556, in _get_package_pool
    pool = self.get_reduced_index(specs)
  File "/home/thuegerich/miniconda3/envs/nbdev/lib/python3.10/site-packages/conda/common/io.py", line 86, in decorated
    return f(*args, **kwds)
  File "/home/thuegerich/miniconda3/envs/nbdev/lib/python3.10/site-packages/conda/resolve.py", line 577, in get_reduced_index
    explicit_specs, features = self.verify_specs(explicit_specs)
  File "/home/thuegerich/miniconda3/envs/nbdev/lib/python3.10/site-packages/conda/resolve.py", line 289, in verify_specs    raise ResolvePackageNotFound(bad_deps)
conda.exceptions.ResolvePackageNotFound:
  - jupyter-client

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/thuegerich/miniconda3/envs/nbdev/bin/conda-build", line 11, in <module>
    sys.exit(main())
  File "/home/thuegerich/miniconda3/envs/nbdev/lib/python3.10/site-packages/conda_build/cli/main_build.py", line 494, in main
    execute(sys.argv[1:])
  File "/home/thuegerich/miniconda3/envs/nbdev/lib/python3.10/site-packages/conda_build/cli/main_build.py", line 474, in execute
    outputs = api.build(
  File "/home/thuegerich/miniconda3/envs/nbdev/lib/python3.10/site-packages/conda_build/api.py", line 180, in build
    return build_tree(
  File "/home/thuegerich/miniconda3/envs/nbdev/lib/python3.10/site-packages/conda_build/build.py", line 3094, in build_tree
    packages_from_this = build(metadata, stats,
  File "/home/thuegerich/miniconda3/envs/nbdev/lib/python3.10/site-packages/conda_build/build.py", line 2049, in build
    output_metas = expand_outputs([(m, need_source_download, need_reparse_in_env)])
  File "/home/thuegerich/miniconda3/envs/nbdev/lib/python3.10/site-packages/conda_build/render.py", line 780, in expand_outputs
    for (output_dict, m) in deepcopy(_m).get_output_metadata_set(permit_unsatisfiable_variants=False):
  File "/home/thuegerich/miniconda3/envs/nbdev/lib/python3.10/site-packages/conda_build/metadata.py", line 2522, in get_output_metadata_set
    conda_packages = finalize_outputs_pass(
  File "/home/thuegerich/miniconda3/envs/nbdev/lib/python3.10/site-packages/conda_build/metadata.py", line 884, in finalize_outputs_pass
    fm = finalize_metadata(
  File "/home/thuegerich/miniconda3/envs/nbdev/lib/python3.10/site-packages/conda_build/render.py", line 540, in finalize_metadata
    build_unsat, host_unsat = add_upstream_pins(m,
  File "/home/thuegerich/miniconda3/envs/nbdev/lib/python3.10/site-packages/conda_build/render.py", line 402, in add_upstream_pins
    host_deps, host_unsat, extra_run_specs_from_host = _read_upstream_pin_files(m, 'host',
  File "/home/thuegerich/miniconda3/envs/nbdev/lib/python3.10/site-packages/conda_build/render.py", line 367, in _read_upstream_pin_files
    deps, actions, unsat = get_env_dependencies(m, env, m.config.variant,
  File "/home/thuegerich/miniconda3/envs/nbdev/lib/python3.10/site-packages/conda_build/render.py", line 132, in get_env_dependencies
    actions = environ.get_install_actions(tmpdir, tuple(dependencies), env,
  File "/home/thuegerich/miniconda3/envs/nbdev/lib/python3.10/site-packages/conda_build/environ.py", line 799, in get_install_actions
    raise DependencyNeedsBuildingError(exc, subdir=subdir)
conda_build.exceptions.DependencyNeedsBuildingError: Unsatisfiable dependencies for platform linux-64: {'jupyter-client'}
Traceback (most recent call last):
  File "/home/thuegerich/miniconda3/envs/nbdev/bin/nbdev_conda", line 10, in <module>
    sys.exit(release_conda())
  File "/home/thuegerich/miniconda3/envs/nbdev/lib/python3.10/site-packages/fastcore/script.py", line 119, in _f
    return tfunc(**merge(args, args_from_prog(func, xtra)))
  File "/home/thuegerich/miniconda3/envs/nbdev/lib/python3.10/site-packages/nbdev/release.py", line 277, in release_conda
    res = _run(cmd)
  File "/home/thuegerich/miniconda3/envs/nbdev/lib/python3.10/site-packages/nbdev/release.py", line 177, in _run
    if p.returncode != 0: raise CalledProcessError(p.returncode, p.args)
subprocess.CalledProcessError: Command '['conda', 'build', '--output-folder', 'out', '--no-anaconda-upload', 'nbstata']' returned non-zero exit status 1.

My OS here is WSL 2. Here’s a partial conda list of my ‘nbdev’ environment:

anaconda-client           1.11.0             pyhd8ed1ab_1    conda-forge
conda                     22.9.0          py310hff52083_2    conda-forge
conda-build               3.23.1          py310hff52083_0    conda-forge
conda-package-handling    1.9.0           py310h5764c6d_1    conda-forge
conda-verify              3.1.1           py310hff52083_1006    conda-forge
execnb                    0.1.4                      py_0    fastai
fastcore                  1.5.27                     py_0    fastai
ghapi                     1.0.3                      py_0    fastai
jupyter_client            7.4.7              pyhd8ed1ab_0    conda-forge
nbconvert                 7.2.5              pyhd8ed1ab_0    conda-forge
nbconvert-core            7.2.5              pyhd8ed1ab_0    conda-forge
nbconvert-pandoc          7.2.5              pyhd8ed1ab_0    conda-forge
nbdev                     2.3.9                      py_0    fastai
nbformat                  5.7.0              pyhd8ed1ab_0    conda-forge
pandoc                    2.19.2               h32600fe_1    conda-forge
pandocfilters             1.5.0              pyhd8ed1ab_0    conda-forge
python                    3.10.7          h4a9ceb5_0_cpython    conda-forge
setuptools                65.5.1             pyhd8ed1ab_0    conda-forge
wheel                     0.38.4             pyhd8ed1ab_0    conda-forge