---

title: Create conda packages


keywords: fastai
sidebar: home_sidebar

summary: "Pure python packages created from nbdev settings.ini"
description: "Pure python packages created from nbdev settings.ini"
nb_path: "01_conda.ipynb"
---
<!--

#################################################
### THIS FILE WAS AUTOGENERATED! DO NOT EDIT! ###
#################################################
# file to edit: 01_conda.ipynb
# command to build the docs after a change: nbdev_build_docs

-->

<div class="container" id="notebook-container">
        
    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

<div class="output_wrapper">
<div class="output">

<div class="output_area">


<div class="output_markdown rendered_html output_subarea ">
<h4 id="pypi_json" class="doc_header"><code>pypi_json</code><a href="https://github.com/fastai/fastrelease/tree/master/fastrelease/conda.py#L19" class="source_link" style="float:right">[source]</a></h4><blockquote><p><code>pypi_json</code>(<strong><code>s</code></strong>)</p>
</blockquote>
<p>Dictionary decoded JSON for PYPI path <code>s</code></p>

</div>

</div>

</div>
</div>

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

<div class="output_wrapper">
<div class="output">

<div class="output_area">


<div class="output_markdown rendered_html output_subarea ">
<h4 id="latest_pypi" class="doc_header"><code>latest_pypi</code><a href="https://github.com/fastai/fastrelease/tree/master/fastrelease/conda.py#L24" class="source_link" style="float:right">[source]</a></h4><blockquote><p><code>latest_pypi</code>(<strong><code>name</code></strong>)</p>
</blockquote>
<p>Latest version of <code>name</code> on pypi</p>

</div>

</div>

</div>
</div>

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

<div class="output_wrapper">
<div class="output">

<div class="output_area">


<div class="output_markdown rendered_html output_subarea ">
<h4 id="pypi_details" class="doc_header"><code>pypi_details</code><a href="https://github.com/fastai/fastrelease/tree/master/fastrelease/conda.py#L30" class="source_link" style="float:right">[source]</a></h4><blockquote><p><code>pypi_details</code>(<strong><code>name</code></strong>)</p>
</blockquote>
<p>Version, URL, and SHA256 for <code>name</code> from pypi</p>

</div>

</div>

</div>
</div>

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

<div class="output_wrapper">
<div class="output">

<div class="output_area">


<div class="output_markdown rendered_html output_subarea ">
<h4 id="update_meta" class="doc_header"><code>update_meta</code><a href="https://github.com/fastai/fastrelease/tree/master/fastrelease/conda.py#L39" class="source_link" style="float:right">[source]</a></h4><blockquote><p><code>update_meta</code>(<strong><code>name</code></strong>, <strong><code>src_path</code></strong>, <strong><code>dest_path</code></strong>)</p>
</blockquote>
<p>Update VERSION and SHA256 in meta.yaml from pypi</p>

</div>

</div>

</div>
</div>

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

<div class="output_wrapper">
<div class="output">

<div class="output_area">


<div class="output_markdown rendered_html output_subarea ">
<h4 id="conda_output_path" class="doc_header"><code>conda_output_path</code><a href="https://github.com/fastai/fastrelease/tree/master/fastrelease/conda.py#L48" class="source_link" style="float:right">[source]</a></h4><blockquote><p><code>conda_output_path</code>(<strong><code>name</code></strong>, <strong><code>ver</code></strong>)</p>
</blockquote>
<p>Output path for conda build</p>

</div>

</div>

</div>
</div>

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">
<div class="input">

<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">conda_output_path</span><span class="p">(</span><span class="s1">&#39;fastai&#39;</span><span class="p">,</span><span class="s1">&#39;2.1.0&#39;</span><span class="p">)</span>
</pre></div>

    </div>
</div>
</div>

<div class="output_wrapper">
<div class="output">

<div class="output_area">



<div class="output_text output_subarea output_execute_result">
<pre>&#39;/home/jhoward/anaconda3/conda-bld/noarch/fastai-2.1.0-py_0.tar.bz2&#39;</pre>
</div>

</div>

</div>
</div>

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

<div class="output_wrapper">
<div class="output">

<div class="output_area">


<div class="output_markdown rendered_html output_subarea ">
<h4 id="write_pip_conda_meta" class="doc_header"><code>write_pip_conda_meta</code><a href="https://github.com/fastai/fastrelease/tree/master/fastrelease/conda.py#L85" class="source_link" style="float:right">[source]</a></h4><blockquote><p><code>write_pip_conda_meta</code>(<strong><code>name</code></strong>, <strong><code>path</code></strong>=<em><code>'conda'</code></em>)</p>
</blockquote>
<p>Writes a <code>meta.yaml</code> file for <code>name</code> to the <a href="/conda.html"><code>conda</code></a> directory of the current directory</p>

</div>

</div>

</div>
</div>

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

<div class="output_wrapper">
<div class="output">

<div class="output_area">


<div class="output_markdown rendered_html output_subarea ">
<h4 id="write_conda_meta" class="doc_header"><code>write_conda_meta</code><a href="https://github.com/fastai/fastrelease/tree/master/fastrelease/conda.py#L124" class="source_link" style="float:right">[source]</a></h4><blockquote><p><code>write_conda_meta</code>(<strong><code>path</code></strong>=<em><code>'conda'</code></em>)</p>
</blockquote>
<p>Writes a <code>meta.yaml</code> file to the <a href="/conda.html"><code>conda</code></a> directory of the current directory</p>

</div>

</div>

</div>
</div>

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>This function is used in the <a href="/conda.html#fastrelease_conda_package"><code>fastrelease_conda_package</code></a> CLI command.</p>
<p><strong>NB</strong>: you need to first of all upload your package to PyPi, before creating the conda package.</p>

</div>
</div>
</div>
    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

<div class="output_wrapper">
<div class="output">

<div class="output_area">


<div class="output_markdown rendered_html output_subarea ">
<h4 id="anaconda_upload" class="doc_header"><code>anaconda_upload</code><a href="https://github.com/fastai/fastrelease/tree/master/fastrelease/conda.py#L129" class="source_link" style="float:right">[source]</a></h4><blockquote><p><code>anaconda_upload</code>(<strong><code>name</code></strong>, <strong><code>version</code></strong>, <strong><code>user</code></strong>=<em><code>None</code></em>)</p>
</blockquote>
<p>Update <code>name</code> <code>version</code> to anaconda</p>

</div>

</div>

</div>
</div>

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

<div class="output_wrapper">
<div class="output">

<div class="output_area">


<div class="output_markdown rendered_html output_subarea ">
<h4 id="fastrelease_conda_package" class="doc_header"><code>fastrelease_conda_package</code><a href="https://github.com/fastai/fastrelease/tree/master/fastrelease/conda.py#L135" class="source_link" style="float:right">[source]</a></h4><blockquote><p><code>fastrelease_conda_package</code>(<strong><code>path</code></strong>:"Path where package will be created"=<em><code>'conda'</code></em>, <strong><code>do_build</code></strong>:"Run <code>conda build</code> step"=<em><code>True</code></em>, <strong><code>build_args</code></strong>:"Additional args (as str) to send to <code>conda build</code>"=<em><code>''</code></em>, <strong><code>skip_upload</code></strong>:"Skip <code>anaconda upload</code> step"=<em><code>False</code></em>, <strong><code>mambabuild</code></strong>:"Use <code>mambabuild</code> (requires <code>boa</code>)"=<em><code>False</code></em>, <strong><code>upload_user</code></strong>:"Optional user to upload package to"=<em><code>None</code></em>)</p>
</blockquote>
<p>Create a <code>meta.yaml</code> file ready to be built into a package, and optionally build and upload it</p>

</div>

</div>

</div>
</div>

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>To build and upload a conda package, cd to the root of your repo, and then:</p>

<pre><code>fastrelease_conda_package

</code></pre>
<p>Or to do things more manually:</p>

<pre><code>fastrelease_conda_package --do_build false
cd conda
conda build --no-anaconda-upload --output-folder build {name}
anaconda upload build/noarch/{name}-{ver}-*.tar.bz2</code></pre>
<p>Add <code>--debug</code> to the <code>conda build command</code> to debug any problems that occur. Note that the build step takes a few minutes. Add <code>-u {org_name}</code> to the <code>anaconda upload</code> command if you wish to upload to an organization, or pass <code>upload_user</code> to <a href="/conda.html#fastrelease_conda_package"><code>fastrelease_conda_package</code></a>.</p>
<p><strong>NB</strong>: you need to first of all upload your package to PyPi, before creating the conda package.</p>

</div>
</div>
</div>
</div>
 

