Repository: conda/conda-build

Issue:
Problems trying Tutorial
I am trying to follow the conda-build tutorial (pyinstrument) on a Mac running High Sierra with Miniconda. However, I get the following error.

```
My-MacBook-Air:~/pyinstrument$ conda-build pyinstrument
Glob /Users/diomedea/pyinstrument/pyinstrument did not match in root_dir /Users/diomedea/pyinstrument
ERROR:conda_build.utils:Glob /Users/diomedea/pyinstrument/pyinstrument did not match in root_dir /Users/diomedea/pyinstrument
Traceback (most recent call last):
  File "/Users/diomedea/miniconda3/bin/conda-build", line 11, in <module>
    sys.exit(main())
  File "/Users/diomedea/miniconda3/lib/python3.6/site-packages/conda_build/cli/main_build.py", line 393, in main
    execute(sys.argv[1:])
  File "/Users/diomedea/miniconda3/lib/python3.6/site-packages/conda_build/cli/main_build.py", line 384, in execute
    verify=args.verify)
  File "/Users/diomedea/miniconda3/lib/python3.6/site-packages/conda_build/api.py", line 184, in build
    raise ValueError('No valid recipes found for input: {}'.format(recipe_paths_or_metadata))
ValueError: No valid recipes found for input: ['pyinstrument']
```

[Incidentally, I note that $PYTHON does not appear to be set. When I execute 'echo $PYTHON' I get nothing back. Could this be related? The tutorial does not ask the user to set any environment variables.]




Discussion:
```bash
$ conda-build --help|grep -A1 '^  RECIPE_PATH'
  RECIPE_PATH           Path to recipe directory. Pass 'purge' here to clean
                        the work and test intermediates.
```
If you are already inside the `pyinstrument` folder, you have to specify the current directory, i.e., `conda-build .`.
Hi, I am faceing to same problem. I trying to do tutorial as follows.
https://conda.io/docs/user-guide/tutorials/build-pkgs-skeleton.html

### executing commands

```console
$  ls
pyinstrument/

$ ls pyinstrument/
bld.bat  build.sh  meta.yaml

$ conda-build pyinstrument
Adding in variants from internal_defaults
INFO:conda_build.variants:Adding in variants from internal_defaults
Attempting to finalize metadata for pyinstrument
INFO:conda_build.metadata:Attempting to finalize metadata for pyinstrument
Solving environment: failed

Leaving build/test directories:
  Work:  /home/ubuntu/miniconda/conda-bld/work
  Test:  /home/ubuntu/miniconda/conda-bld/test_tmp
Leaving build/test environments:
  Test: source activate  /home/ubuntu/miniconda/conda-bld/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placeho
ld_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl
acehold_pl
  Build:        source activate  /home/ubuntu/miniconda/conda-bld/_build_env


Traceback (most recent call last):
  File "/home/ubuntu/miniconda/lib/python3.6/site-packages/conda_build/environ.py", line 706, in get_install_actions
    actions = install_actions(prefix, index, specs, force=True)
  File "/home/ubuntu/miniconda/lib/python3.6/site-packages/conda/common/io.py", line 415, in decorated
    return f(*args, **kwds)
  File "/home/ubuntu/miniconda/lib/python3.6/site-packages/conda/plan.py", line 546, in install_actions
    txn = solver.solve_for_transaction(prune=prune, ignore_pinned=not pinned)
  File "/home/ubuntu/miniconda/lib/python3.6/site-packages/conda/core/solve.py", line 504, in solve_for_transaction
    force_remove, force_reinstall)
  File "/home/ubuntu/miniconda/lib/python3.6/site-packages/conda/core/solve.py", line 437, in solve_for_diff
    final_precs = self.solve_final_state(deps_modifier, prune, ignore_pinned, force_remove)
  File "/home/ubuntu/miniconda/lib/python3.6/site-packages/conda/core/solve.py", line 317, in solve_final_state
    conflicting_specs = r.get_conflicting_specs(tuple(final_environment_specs))
  File "/home/ubuntu/miniconda/lib/python3.6/site-packages/conda/resolve.py", line 690, in get_conflicting_specs
    reduced_index = self.get_reduced_index(specs)
  File "/home/ubuntu/miniconda/lib/python3.6/site-packages/conda/resolve.py", line 254, in get_reduced_index
    specs, features = self.verify_specs(specs)
  File "/home/ubuntu/miniconda/lib/python3.6/site-packages/conda/resolve.py", line 172, in verify_specs
    raise ResolvePackageNotFound(bad_deps)
conda.exceptions.ResolvePackageNotFound:
  - pyinstrument_cext

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/ubuntu/miniconda/bin/conda-build", line 11, in <module>
    sys.exit(main())
  File "/home/ubuntu/miniconda/lib/python3.6/site-packages/conda_build/cli/main_build.py", line 399, in main
    execute(sys.argv[1:])
  File "/home/ubuntu/miniconda/lib/python3.6/site-packages/conda_build/cli/main_build.py", line 390, in execute
    verify=args.verify)
  File "/home/ubuntu/miniconda/lib/python3.6/site-packages/conda_build/api.py", line 188, in build
    need_source_download=need_source_download, config=config, variants=variants)
  File "/home/ubuntu/miniconda/lib/python3.6/site-packages/conda_build/build.py", line 1916, in build_tree
    notest=notest,
  File "/home/ubuntu/miniconda/lib/python3.6/site-packages/conda_build/build.py", line 974, in build
    output_metas = expand_outputs([(m, need_source_download, need_reparse_in_env)])
  File "/home/ubuntu/miniconda/lib/python3.6/site-packages/conda_build/render.py", line 574, in expand_outputs
    for (output_dict, m) in _m.get_output_metadata_set(permit_unsatisfiable_variants=False):
  File "/home/ubuntu/miniconda/lib/python3.6/site-packages/conda_build/metadata.py", line 1808, in get_output_metadata_set
    permit_unsatisfiable_variants=permit_unsatisfiable_variants)
  File "/home/ubuntu/miniconda/lib/python3.6/site-packages/conda_build/metadata.py", line 662, in finalize_outputs_pass
    fm = finalize_metadata(om, permit_unsatisfiable_variants=permit_unsatisfiable_variants)
  File "/home/ubuntu/miniconda/lib/python3.6/site-packages/conda_build/render.py", line 371, in finalize_metadata
    exclude_pattern)
  File "/home/ubuntu/miniconda/lib/python3.6/site-packages/conda_build/render.py", line 303, in add_upstream_pins
    permit_unsatisfiable_variants, exclude_pattern)
  File "/home/ubuntu/miniconda/lib/python3.6/site-packages/conda_build/render.py", line 282, in _read_upstream_pin_files
    permit_unsatisfiable_variants=permit_unsatisfiable_variants)
  File "/home/ubuntu/miniconda/lib/python3.6/site-packages/conda_build/render.py", line 117, in get_env_dependencies
    channel_urls=tuple(m.config.channel_urls))
  File "/home/ubuntu/miniconda/lib/python3.6/site-packages/conda_build/environ.py", line 708, in get_install_actions
    raise DependencyNeedsBuildingError(exc, subdir=subdir)
conda_build.exceptions.DependencyNeedsBuildingError: Unsatisfiable dependencies for platform linux-64: {'pyinstrument_cext'}
```

### environment

```
$ conda --version
conda 4.4.7

$ conda build --version
conda-build 3.2.2

$ uname -na
Linux ubuntu-xenial 4.4.0-104-generic #127-Ubuntu SMP Mon Dec 11 12:16:42 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
```
Linux VM is booted by vagrant . box is `ubuntu/xenial64 (virtualbox, 20171221.0.0)`

Any help?
@masayuki14 that's different.  pyinstrument changed their contents since we wrote the docs, and it's now a little more complicated.

When you make the skeleton, do so with

```conda skeleton pypi --recursive pyinstrument```

which will create 2 recipes - one for pyinstrument, and another for the dependency that conda-build is telling you is missing.  Then try your build again.
Thanks @msarahan .
I try to `conda skeleton pypi --recursive pyinstrument` but I can't.

```console
Warning, the following versions were found for pyinstrument
0.10.1
0.11
0.12
0.13
0.13.1
0.13.2
2.0.0b1
2.0.0
2.0.1
Using 2.0.1
Use --version to specify a different version.
Using url https://files.pythonhosted.org/packages/24/de/a73cb5f7f46dbaae1154a9dc935c4d5f7a73ec22a52a06f780778b3278be/pyinstrument-2.0.1.tar.gz (54 KB) for pyinstrument.
Downloading pyinstrument
PyPI URL:  https://files.pythonhosted.org/packages/24/de/a73cb5f7f46dbaae1154a9dc935c4d5f7a73ec22a52a06f780778b3278be/pyinstrument-2.0.1.tar.gz
Using cached download
Unpacking pyinstrument...
done
working in /tmp/tmplox96ymrconda_skeleton_pyinstrument-2.0.1.tar.gz
Solving environment: ...working... done

## Package Plan ##

  environment location: /home/ubuntu/miniconda/conda-bld/skeleton_1516327833973/_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:

    ca-certificates: 2017.08.26-h1d4fec5_0   
    certifi:         2017.11.5-py36hf29ccca_0
    libedit:         3.1-heed3624_0          
    libffi:          3.2.1-hd88cf55_4        
    libgcc-ng:       7.2.0-h7cc24e2_2        
    libstdcxx-ng:    7.2.0-h7a57d05_2        
    ncurses:         6.0-h9df7e31_2          
    openssl:         1.0.2n-hb7f436b_0       
    pip:             9.0.1-py36h6c6f9ce_4    
    python:          3.6.4-hc3d631a_1        
    pyyaml:          3.12-py36hafb9ca4_1     
    readline:        7.0-ha6073c6_4          
    setuptools:      38.4.0-py36_0           
    sqlite:          3.20.1-hb898158_2       
    tk:              8.6.7-hc745277_3        
    wheel:           0.30.0-py36hfd4bba0_1   
    xz:              5.2.3-h55aa19d_2        
    yaml:            0.1.7-had09818_2        
    zlib:            1.2.11-ha838bed_2       

Preparing transaction: ...working... done
Verifying transaction: ...working... done
Executing transaction: ...working... done
Applying patch: '/tmp/tmplox96ymrconda_skeleton_pyinstrument-2.0.1.tar.gz/pypi-distutils.patch'
Trying to apply patch as-is
patching file core.py
Hunk #1 succeeded at 167 with fuzz 2 (offset 1 line).
Using url https://files.pythonhosted.org/packages/bc/2d/263c8c6eb5e564c282f40bd3c3dc0e58b0d33bae91148a9504a9847fb2ef/pyinstrument_cext-0.1.2.tar.gz (3 KB) for pyinstrument_cext.
Downloading pyinstrument_cext
PyPI URL:  https://files.pythonhosted.org/packages/bc/2d/263c8c6eb5e564c282f40bd3c3dc0e58b0d33bae91148a9504a9847fb2ef/pyinstrument_cext-0.1.2.tar.gz
Using cached download
Unpacking pyinstrument_cext...
done
working in /tmp/tmpq61kqv3vconda_skeleton_pyinstrument_cext-0.1.2.tar.gz

## Package Plan ##

  environment location: /home/ubuntu/miniconda/conda-bld/skeleton_1516327833973/_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:

    ca-certificates: 2017.08.26-h1d4fec5_0   
    certifi:         2017.11.5-py36hf29ccca_0
    libedit:         3.1-heed3624_0          
    libffi:          3.2.1-hd88cf55_4        
    libgcc-ng:       7.2.0-h7cc24e2_2        
    libstdcxx-ng:    7.2.0-h7a57d05_2        
    ncurses:         6.0-h9df7e31_2          
    openssl:         1.0.2n-hb7f436b_0       
    pip:             9.0.1-py36h6c6f9ce_4    
    python:          3.6.4-hc3d631a_1        
    pyyaml:          3.12-py36hafb9ca4_1     
    readline:        7.0-ha6073c6_4          
    setuptools:      38.4.0-py36_0           
    sqlite:          3.20.1-hb898158_2       
    tk:              8.6.7-hc745277_3        
    wheel:           0.30.0-py36hfd4bba0_1   
    xz:              5.2.3-h55aa19d_2        
    yaml:            0.1.7-had09818_2        
    zlib:            1.2.11-ha838bed_2       

Preparing transaction: ...working... done
Verifying transaction: ...working... done
Executing transaction: ...working... failed
Rolling back transaction: ...working... done

Leaving build/test directories:
  Work:	 /home/ubuntu/miniconda/conda-bld/skeleton_1516327833973/work 
  Test:	 /home/ubuntu/miniconda/conda-bld/skeleton_1516327833973/test_tmp 
Leaving build/test environments:
  Test:	source activate  /home/ubuntu/miniconda/conda-bld/skeleton_1516327833973/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold 
  Build:	source activate  /home/ubuntu/miniconda/conda-bld/skeleton_1516327833973/_build_env 


Warning, the following versions were found for pyinstrument
0.10.1
0.11
0.12
0.13
0.13.1
0.13.2
2.0.0b1
2.0.0
2.0.1
Using 2.0.1
Use --version to specify a different version.
Using url https://files.pythonhosted.org/packages/24/de/a73cb5f7f46dbaae1154a9dc935c4d5f7a73ec22a52a06f780778b3278be/pyinstrument-2.0.1.tar.gz (54 KB) for pyinstrument.
Downloading pyinstrument
PyPI URL:  https://files.pythonhosted.org/packages/24/de/a73cb5f7f46dbaae1154a9dc935c4d5f7a73ec22a52a06f780778b3278be/pyinstrument-2.0.1.tar.gz
Using cached download
Unpacking pyinstrument...
done
working in /tmp/tmps6w5jqwdconda_skeleton_pyinstrument-2.0.1.tar.gz
Solving environment: ...working... done

## Package Plan ##

  environment location: /home/ubuntu/miniconda/conda-bld/skeleton_1516327882402/_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:

    ca-certificates: 2017.08.26-h1d4fec5_0   
    certifi:         2017.11.5-py36hf29ccca_0
    libedit:         3.1-heed3624_0          
    libffi:          3.2.1-hd88cf55_4        
    libgcc-ng:       7.2.0-h7cc24e2_2        
    libstdcxx-ng:    7.2.0-h7a57d05_2        
    ncurses:         6.0-h9df7e31_2          
    openssl:         1.0.2n-hb7f436b_0       
    pip:             9.0.1-py36h6c6f9ce_4    
    python:          3.6.4-hc3d631a_1        
    pyyaml:          3.12-py36hafb9ca4_1     
    readline:        7.0-ha6073c6_4          
    setuptools:      38.4.0-py36_0           
    sqlite:          3.20.1-hb898158_2       
    tk:              8.6.7-hc745277_3        
    wheel:           0.30.0-py36hfd4bba0_1   
    xz:              5.2.3-h55aa19d_2        
    yaml:            0.1.7-had09818_2        
    zlib:            1.2.11-ha838bed_2       

Preparing transaction: ...working... done
Verifying transaction: ...working... done
Executing transaction: ...working... done
Applying patch: '/tmp/tmps6w5jqwdconda_skeleton_pyinstrument-2.0.1.tar.gz/pypi-distutils.patch'
Trying to apply patch as-is
INFO:conda_build.source:Trying to apply patch as-is
patching file core.py
Hunk #1 succeeded at 167 with fuzz 2 (offset 1 line).
Using url https://files.pythonhosted.org/packages/bc/2d/263c8c6eb5e564c282f40bd3c3dc0e58b0d33bae91148a9504a9847fb2ef/pyinstrument_cext-0.1.2.tar.gz (3 KB) for pyinstrument_cext.
Downloading pyinstrument_cext
PyPI URL:  https://files.pythonhosted.org/packages/bc/2d/263c8c6eb5e564c282f40bd3c3dc0e58b0d33bae91148a9504a9847fb2ef/pyinstrument_cext-0.1.2.tar.gz
Using cached download
Unpacking pyinstrument_cext...
done
working in /tmp/tmp5dydl9_wconda_skeleton_pyinstrument_cext-0.1.2.tar.gz

## Package Plan ##

  environment location: /home/ubuntu/miniconda/conda-bld/skeleton_1516327882402/_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:

    ca-certificates: 2017.08.26-h1d4fec5_0   
    certifi:         2017.11.5-py36hf29ccca_0
    libedit:         3.1-heed3624_0          
    libffi:          3.2.1-hd88cf55_4        
    libgcc-ng:       7.2.0-h7cc24e2_2        
    libstdcxx-ng:    7.2.0-h7a57d05_2        
    ncurses:         6.0-h9df7e31_2          
    openssl:         1.0.2n-hb7f436b_0       
    pip:             9.0.1-py36h6c6f9ce_4    
    python:          3.6.4-hc3d631a_1        
    pyyaml:          3.12-py36hafb9ca4_1     
    readline:        7.0-ha6073c6_4          
    setuptools:      38.4.0-py36_0           
    sqlite:          3.20.1-hb898158_2       
    tk:              8.6.7-hc745277_3        
    wheel:           0.30.0-py36hfd4bba0_1   
    xz:              5.2.3-h55aa19d_2        
    yaml:            0.1.7-had09818_2        
    zlib:            1.2.11-ha838bed_2       

Preparing transaction: ...working... done
Verifying transaction: ...working... done
Executing transaction: ...working... failed
ERROR:conda.core.link:An error occurred while installing package 'defaults::ca-certificates-2017.08.26-h1d4fec5_0'.
AssertionError()
Attempting to roll back.

Rolling back transaction: ...working... done

Leaving build/test directories:
  Work:	 /home/ubuntu/miniconda/conda-bld/skeleton_1516327882402/work 
  Test:	 /home/ubuntu/miniconda/conda-bld/skeleton_1516327882402/test_tmp 
Leaving build/test environments:
  Test:	source activate  /home/ubuntu/miniconda/conda-bld/skeleton_1516327882402/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold 
  Build:	source activate  /home/ubuntu/miniconda/conda-bld/skeleton_1516327882402/_build_env 


Traceback (most recent call last):
  File "/home/ubuntu/miniconda/lib/python3.6/site-packages/conda/core/link.py", line 535, in _execute_actions
    action.execute()
  File "/home/ubuntu/miniconda/lib/python3.6/site-packages/conda/core/path_actions.py", line 817, in execute
    PrefixData(self.target_prefix).insert(self.prefix_record)
  File "/home/ubuntu/miniconda/lib/python3.6/site-packages/conda/core/linked_data.py", line 51, in insert
    assert prefix_record.name not in self._prefix_records
AssertionError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/ubuntu/miniconda/lib/python3.6/site-packages/conda/core/link.py", line 472, in _execute
    cls._execute_actions(pkg_idx, axngroup)
  File "/home/ubuntu/miniconda/lib/python3.6/site-packages/conda/core/link.py", line 553, in _execute_actions
    reverse_excs,
conda.CondaMultiError: 


During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/ubuntu/miniconda/bin/conda-skeleton", line 11, in <module>
    sys.exit(main())
  File "/home/ubuntu/miniconda/lib/python3.6/site-packages/conda_build/cli/main_skeleton.py", line 66, in main
    return execute(sys.argv[1:])
  File "/home/ubuntu/miniconda/lib/python3.6/site-packages/conda_build/cli/main_skeleton.py", line 62, in execute
    version=args.version, config=config)
  File "/home/ubuntu/miniconda/lib/python3.6/site-packages/conda_build/api.py", line 263, in skeletonize
    recursive=recursive, config=config, **kwargs)
  File "/home/ubuntu/miniconda/lib/python3.6/site-packages/conda_build/skeletons/pypi.py", line 274, in skeletonize
    setup_options=setup_options)
  File "/home/ubuntu/miniconda/lib/python3.6/site-packages/conda_build/skeletons/pypi.py", line 659, in get_package_metadata
    config=config)
  File "/home/ubuntu/miniconda/lib/python3.6/site-packages/conda_build/skeletons/pypi.py", line 962, in get_pkginfo
    setup_options=setup_options)
  File "/home/ubuntu/miniconda/lib/python3.6/site-packages/conda_build/skeletons/pypi.py", line 998, in run_setuppy
    subdir=config.host_subdir, clear_cache=False, config=config)
  File "/home/ubuntu/miniconda/lib/python3.6/site-packages/conda_build/environ.py", line 812, in create_env
    execute_actions(actions, index, verbose=config.debug)
  File "/home/ubuntu/miniconda/lib/python3.6/site-packages/conda/common/io.py", line 415, in decorated
    return f(*args, **kwds)
  File "/home/ubuntu/miniconda/lib/python3.6/site-packages/conda/plan.py", line 398, in execute_actions
    execute_instructions(plan, index, verbose)
  File "/home/ubuntu/miniconda/lib/python3.6/site-packages/conda/plan.py", line 605, in execute_instructions
    cmd(state, arg)
  File "/home/ubuntu/miniconda/lib/python3.6/site-packages/conda/instructions.py", line 70, in UNLINKLINKTRANSACTION_CMD
    unlink_link_transaction.execute()
  File "/home/ubuntu/miniconda/lib/python3.6/site-packages/conda/core/link.py", line 225, in execute
    self._execute(tuple(concat(interleave(itervalues(self.prefix_action_groups)))))
  File "/home/ubuntu/miniconda/lib/python3.6/site-packages/conda/core/link.py", line 500, in _execute
    rollback_excs,
conda.CondaMultiError: 
```

How should I do ?
That's a new, completely different error.  It could be a permissions error, but it's really impossible to say.  What is the output from the ``conda info`` command?
@mbargull Thanks for responding to my request for help. I have tried the two things that I thought you might have meant, but no success. Did I understand correctly what you meant?

```
My-MacBook-Air:~/pyinstrument$ conda-build ./pyinstrument
Glob /Users/diomedea/pyinstrument/./pyinstrument did not match in root_dir /Users/diomedea/pyinstrument
ERROR:conda_build.utils:Glob /Users/diomedea/pyinstrument/./pyinstrument did not match in root_dir /Users/diomedea/pyinstrument
Traceback (most recent call last):
  File "/Users/diomedea/miniconda3/bin/conda-build", line 11, in <module>
    sys.exit(main())
  File "/Users/diomedea/miniconda3/lib/python3.6/site-packages/conda_build/cli/main_build.py", line 393, in main
    execute(sys.argv[1:])
  File "/Users/diomedea/miniconda3/lib/python3.6/site-packages/conda_build/cli/main_build.py", line 384, in execute
    verify=args.verify)
  File "/Users/diomedea/miniconda3/lib/python3.6/site-packages/conda_build/api.py", line 184, in build
    raise ValueError('No valid recipes found for input: {}'.format(recipe_paths_or_metadata))
ValueError: No valid recipes found for input: ['./pyinstrument']
```
Also...

```
My-MacBook-Air:~/pyinstrument$ conda-build . pyinstrument
Glob /Users/diomedea/pyinstrument/pyinstrument did not match in root_dir /Users/diomedea/pyinstrument
ERROR:conda_build.utils:Glob /Users/diomedea/pyinstrument/pyinstrument did not match in root_dir /Users/diomedea/pyinstrument
Adding in variants from internal_defaults
INFO:conda_build.variants:Adding in variants from internal_defaults
Attempting to finalize metadata for pyinstrument
INFO:conda_build.metadata:Attempting to finalize metadata for pyinstrument
Solving environment: failed

Leaving build/test directories:
  Work:	 /Users/diomedea/miniconda3/conda-bld/work 
  Test:	 /Users/diomedea/miniconda3/conda-bld/test_tmp 
Leaving build/test environments:
  Test:	source activate  /Users/diomedea/miniconda3/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_ 
  Build:	source activate  /Users/diomedea/miniconda3/conda-bld/_build_env 


Traceback (most recent call last):
  File "/Users/diomedea/miniconda3/lib/python3.6/site-packages/conda_build/environ.py", line 706, in get_install_actions
    actions = install_actions(prefix, index, specs, force=True)
  File "/Users/diomedea/miniconda3/lib/python3.6/site-packages/conda/common/io.py", line 415, in decorated
    return f(*args, **kwds)
  File "/Users/diomedea/miniconda3/lib/python3.6/site-packages/conda/plan.py", line 546, in install_actions
    txn = solver.solve_for_transaction(prune=prune, ignore_pinned=not pinned)
  File "/Users/diomedea/miniconda3/lib/python3.6/site-packages/conda/core/solve.py", line 504, in solve_for_transaction
    force_remove, force_reinstall)
  File "/Users/diomedea/miniconda3/lib/python3.6/site-packages/conda/core/solve.py", line 437, in solve_for_diff
    final_precs = self.solve_final_state(deps_modifier, prune, ignore_pinned, force_remove)
  File "/Users/diomedea/miniconda3/lib/python3.6/site-packages/conda/core/solve.py", line 317, in solve_final_state
    conflicting_specs = r.get_conflicting_specs(tuple(final_environment_specs))
  File "/Users/diomedea/miniconda3/lib/python3.6/site-packages/conda/resolve.py", line 690, in get_conflicting_specs
    reduced_index = self.get_reduced_index(specs)
  File "/Users/diomedea/miniconda3/lib/python3.6/site-packages/conda/resolve.py", line 254, in get_reduced_index
    specs, features = self.verify_specs(specs)
  File "/Users/diomedea/miniconda3/lib/python3.6/site-packages/conda/resolve.py", line 172, in verify_specs
    raise ResolvePackageNotFound(bad_deps)
conda.exceptions.ResolvePackageNotFound: 
  - pyinstrument_cext

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/diomedea/miniconda3/bin/conda-build", line 11, in <module>
    sys.exit(main())
  File "/Users/diomedea/miniconda3/lib/python3.6/site-packages/conda_build/cli/main_build.py", line 393, in main
    execute(sys.argv[1:])
  File "/Users/diomedea/miniconda3/lib/python3.6/site-packages/conda_build/cli/main_build.py", line 384, in execute
    verify=args.verify)
  File "/Users/diomedea/miniconda3/lib/python3.6/site-packages/conda_build/api.py", line 186, in build
    need_source_download=need_source_download, config=config, variants=variants)
  File "/Users/diomedea/miniconda3/lib/python3.6/site-packages/conda_build/build.py", line 1909, in build_tree
    notest=notest,
  File "/Users/diomedea/miniconda3/lib/python3.6/site-packages/conda_build/build.py", line 972, in build
    output_metas = expand_outputs([(m, need_source_download, need_reparse_in_env)])
  File "/Users/diomedea/miniconda3/lib/python3.6/site-packages/conda_build/render.py", line 617, in expand_outputs
    for (output_dict, m) in _m.get_output_metadata_set(permit_unsatisfiable_variants=False):
  File "/Users/diomedea/miniconda3/lib/python3.6/site-packages/conda_build/metadata.py", line 1764, in get_output_metadata_set
    permit_unsatisfiable_variants=permit_unsatisfiable_variants)
  File "/Users/diomedea/miniconda3/lib/python3.6/site-packages/conda_build/metadata.py", line 645, in finalize_outputs_pass
    fm = finalize_metadata(om, permit_unsatisfiable_variants=permit_unsatisfiable_variants)
  File "/Users/diomedea/miniconda3/lib/python3.6/site-packages/conda_build/render.py", line 391, in finalize_metadata
    exclude_pattern)
  File "/Users/diomedea/miniconda3/lib/python3.6/site-packages/conda_build/render.py", line 306, in add_upstream_pins
    permit_unsatisfiable_variants, exclude_pattern)
  File "/Users/diomedea/miniconda3/lib/python3.6/site-packages/conda_build/render.py", line 286, in _read_upstream_pin_files
    permit_unsatisfiable_variants=permit_unsatisfiable_variants)
  File "/Users/diomedea/miniconda3/lib/python3.6/site-packages/conda_build/render.py", line 116, in get_env_dependencies
    channel_urls=tuple(m.config.channel_urls))
  File "/Users/diomedea/miniconda3/lib/python3.6/site-packages/conda_build/environ.py", line 708, in get_install_actions
    raise DependencyNeedsBuildingError(exc, subdir=subdir)
	conda_build.exceptions.DependencyNeedsBuildingError: Unsatisfiable dependencies for platform osx-64: {'pyinstrument_cext'}
```

Also 

```
My-MacBook-Air:~/pyinstrument$ ./conda-build pyinstrument
-bash: ./conda-build: No such file or directory
```
I just tried it with another project and I realised that you meant that I should be in the parent folder. I therefore did `cd ..` and tried again. [Incidentally, with the other package things seemed to work when I did this, so it seems to be a problem with the setup of the tutorial (or some download problem).]

```
My-MacBook-Air:~$ conda-build pyinstrument
Adding in variants from internal_defaults
INFO:conda_build.variants:Adding in variants from internal_defaults
Attempting to finalize metadata for pyinstrument
INFO:conda_build.metadata:Attempting to finalize metadata for pyinstrument
Solving environment: failed

Leaving build/test directories:
  Work:	 /Users/diomedea/miniconda3/conda-bld/work 
  Test:	 /Users/diomedea/miniconda3/conda-bld/test_tmp 
Leaving build/test environments:
  Test:	source activate  /Users/diomedea/miniconda3/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_ 
  Build:	source activate  /Users/diomedea/miniconda3/conda-bld/_build_env 


Traceback (most recent call last):
  File "/Users/diomedea/miniconda3/lib/python3.6/site-packages/conda_build/environ.py", line 706, in get_install_actions
    actions = install_actions(prefix, index, specs, force=True)
  File "/Users/diomedea/miniconda3/lib/python3.6/site-packages/conda/common/io.py", line 415, in decorated
    return f(*args, **kwds)
  File "/Users/diomedea/miniconda3/lib/python3.6/site-packages/conda/plan.py", line 546, in install_actions
    txn = solver.solve_for_transaction(prune=prune, ignore_pinned=not pinned)
  File "/Users/diomedea/miniconda3/lib/python3.6/site-packages/conda/core/solve.py", line 504, in solve_for_transaction
    force_remove, force_reinstall)
  File "/Users/diomedea/miniconda3/lib/python3.6/site-packages/conda/core/solve.py", line 437, in solve_for_diff
    final_precs = self.solve_final_state(deps_modifier, prune, ignore_pinned, force_remove)
  File "/Users/diomedea/miniconda3/lib/python3.6/site-packages/conda/core/solve.py", line 317, in solve_final_state
    conflicting_specs = r.get_conflicting_specs(tuple(final_environment_specs))
  File "/Users/diomedea/miniconda3/lib/python3.6/site-packages/conda/resolve.py", line 690, in get_conflicting_specs
    reduced_index = self.get_reduced_index(specs)
  File "/Users/diomedea/miniconda3/lib/python3.6/site-packages/conda/resolve.py", line 254, in get_reduced_index
    specs, features = self.verify_specs(specs)
  File "/Users/diomedea/miniconda3/lib/python3.6/site-packages/conda/resolve.py", line 172, in verify_specs
    raise ResolvePackageNotFound(bad_deps)
conda.exceptions.ResolvePackageNotFound: 
  - pyinstrument_cext

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/diomedea/miniconda3/bin/conda-build", line 11, in <module>
    sys.exit(main())
  File "/Users/diomedea/miniconda3/lib/python3.6/site-packages/conda_build/cli/main_build.py", line 393, in main
    execute(sys.argv[1:])
  File "/Users/diomedea/miniconda3/lib/python3.6/site-packages/conda_build/cli/main_build.py", line 384, in execute
    verify=args.verify)
  File "/Users/diomedea/miniconda3/lib/python3.6/site-packages/conda_build/api.py", line 186, in build
    need_source_download=need_source_download, config=config, variants=variants)
  File "/Users/diomedea/miniconda3/lib/python3.6/site-packages/conda_build/build.py", line 1909, in build_tree
    notest=notest,
  File "/Users/diomedea/miniconda3/lib/python3.6/site-packages/conda_build/build.py", line 972, in build
    output_metas = expand_outputs([(m, need_source_download, need_reparse_in_env)])
  File "/Users/diomedea/miniconda3/lib/python3.6/site-packages/conda_build/render.py", line 617, in expand_outputs
    for (output_dict, m) in _m.get_output_metadata_set(permit_unsatisfiable_variants=False):
  File "/Users/diomedea/miniconda3/lib/python3.6/site-packages/conda_build/metadata.py", line 1764, in get_output_metadata_set
    permit_unsatisfiable_variants=permit_unsatisfiable_variants)
  File "/Users/diomedea/miniconda3/lib/python3.6/site-packages/conda_build/metadata.py", line 645, in finalize_outputs_pass
    fm = finalize_metadata(om, permit_unsatisfiable_variants=permit_unsatisfiable_variants)
  File "/Users/diomedea/miniconda3/lib/python3.6/site-packages/conda_build/render.py", line 391, in finalize_metadata
    exclude_pattern)
  File "/Users/diomedea/miniconda3/lib/python3.6/site-packages/conda_build/render.py", line 306, in add_upstream_pins
    permit_unsatisfiable_variants, exclude_pattern)
  File "/Users/diomedea/miniconda3/lib/python3.6/site-packages/conda_build/render.py", line 286, in _read_upstream_pin_files
    permit_unsatisfiable_variants=permit_unsatisfiable_variants)
  File "/Users/diomedea/miniconda3/lib/python3.6/site-packages/conda_build/render.py", line 116, in get_env_dependencies
    channel_urls=tuple(m.config.channel_urls))
  File "/Users/diomedea/miniconda3/lib/python3.6/site-packages/conda_build/environ.py", line 708, in get_install_actions
    raise DependencyNeedsBuildingError(exc, subdir=subdir)
	conda_build.exceptions.DependencyNeedsBuildingError: Unsatisfiable dependencies for platform osx-64: {'pyinstrument_cext'}
```
See the comments above, e.g., https://github.com/conda/conda-build/issues/2628#issuecomment-358837496
Please see my comment above at https://github.com/conda/conda-build/issues/2628#issuecomment-358837496
Haha, brains synced ;P.
@msarahan thanks your graet help.
I did `conda list`. 

```console
$ conda list
# packages in environment at /home/ubuntu/miniconda:
#
asn1crypto                0.23.0           py36h4639342_0
beautifulsoup4            4.6.0            py36h49b8c8c_1
ca-certificates           2017.08.26           h1d4fec5_0
certifi                   2017.11.5        py36hf29ccca_0
cffi                      1.11.2           py36h2825082_0
chardet                   3.0.4            py36h0f667ec_1
conda                     4.4.7                    py36_0
conda-build               3.3.0                    py36_0
conda-env                 2.6.0                h36134e3_1
conda-verify              2.0.0            py36h98955d8_0
cryptography              2.1.4            py36hd09be54_0
filelock                  2.0.13           py36h646ffb5_0
glob2                     0.6              py36he249c77_0
idna                      2.6              py36h82fb2a8_1
jinja2                    2.10             py36ha16c418_0
libedit                   3.1                  heed3624_0
libffi                    3.2.1                hd88cf55_4
libgcc-ng                 7.2.0                h7cc24e2_2
libstdcxx-ng              7.2.0                h7a57d05_2
markupsafe                1.0              py36hd9260cd_1
ncurses                   6.0                  h9df7e31_2
openssl                   1.0.2n               hb7f436b_0
patchelf                  0.9                  hf79760b_2
pip                       9.0.1            py36h6c6f9ce_4
pkginfo                   1.4.1            py36h215d178_1
pycosat                   0.6.3            py36h0a5515d_0
pycparser                 2.18             py36hf9f622e_1
pyopenssl                 17.5.0           py36h20ba746_0
pysocks                   1.6.7            py36hd97a5b1_1
python                    3.6.3                h6c0c0dc_5
pyyaml                    3.12             py36hafb9ca4_1
readline                  7.0                  ha6073c6_4
requests                  2.18.4           py36he2e5f8d_1
ruamel_yaml               0.11.14          py36ha2fb22d_2
setuptools                36.5.0           py36he42e2e1_0
six                       1.11.0           py36h372c433_1
sqlite                    3.20.1               hb898158_2
tk                        8.6.7                hc745277_3
urllib3                   1.22             py36hbe7ace6_0
wheel                     0.30.0           py36hfd4bba0_1
xz                        5.2.3                h55aa19d_2
yaml                      0.1.7                had09818_2
zlib                      1.2.11               ha838bed_2
```
@masayuki14 I can reproduce the problem.  I can't explain it, though.  It's doing the right thing for the first recipe, but dying when trying to do the same for the second.  We'll look into it.  For now. you can try it on other recipes that don't require the recursive functionality. 

```conda skeleton pypi click```

should work, and should help you learn.
Thanks a lot. I can do ` $ conda skeleton pypi click` and `$ conda skeleton --recursive click`.
But I cannot do next build command.
I will stop tutorial. But if my python skills improves more, I will contribute conda docs for good way. ( by PR and etc...)

Resolving patch:
diff --git a/conda_build/skeletons/pypi.py b/conda_build/skeletons/pypi.py
--- a/conda_build/skeletons/pypi.py
+++ b/conda_build/skeletons/pypi.py
@@ -1000,6 +1000,7 @@ def run_setuppy(src_dir, temp_dir, python_version, extra_specs, config, setup_op
 
     specs.extend(extra_specs)
 
+    rm_rf(config.host_prefix)
     create_env(config.host_prefix, specs_or_actions=specs, env='host',
                 subdir=config.host_subdir, clear_cache=False, config=config)
     stdlib_dir = join(config.host_prefix,


Test patch: