> ## Documentation Index
> Fetch the complete documentation index at: https://anaconda.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Uploading packages

export const Comments = ({children}) => {
  return <div class="my-4 px-5 py-4 overflow-hidden rounded-2xl flex gap-3 border border-zinc-500/20 bg-zinc-50/50 dark:border-zinc-500/30 dark:bg-zinc-500/10" data-callout-type="comments">
      <div class="w-4">
        <svg width="14" height="14" viewBox="0 0 640 640" fill="currentColor" xmlns="http://www.w3.org/2000/svg" class="w-5 h-5" aria-label="Comments">
            <path d="M320 112C434.9 112 528 205.1 528 320C528 434.9 434.9 528 320 528C205.1 528 112 434.9 112 320C112 205.1 205.1 112 320 112zM320 576C461.4 576 576 461.4 576 320C576 178.6 461.4 64 320 64C178.6 64 64 178.6 64 320C64 461.4 178.6 576 320 576zM280 400C266.7 400 256 410.7 256 424C256 437.3 266.7 448 280 448L360 448C373.3 448 384 437.3 384 424C384 410.7 373.3 400 360 400L352 400L352 312C352 298.7 341.3 288 328 288L280 288C266.7 288 256 298.7 256 312C256 325.3 266.7 336 280 336L304 336L304 400L280 400zM320 256C337.7 256 352 241.7 352 224C352 206.3 337.7 192 320 192C302.3 192 288 206.3 288 224C288 241.7 302.3 256 320 256z" />
        </svg>
      </div>
      <div class="text-sm prose min-w-0 w-full">
        {children}
      </div>
    </div>;
};

## Uploading conda packages

This example shows how to build and upload a [conda](https://docs.conda.io/projects/conda-build/en/stable/index.html) package to Anaconda.org using `conda build`.

1. Open [Anaconda Prompt](/reference/glossary#anaconda-prompt) (Terminal on macOS/Linux).

<Tip>
  More of a visual learner? [Sign in to Anaconda.com](https://auth.anaconda.com/ui/login?return_to=https://anaconda.com/app/) and enroll in our free [Conda Essentials](https://learning.anaconda.com/courses/conda-essentials) course to learn how to write conda recipes and build packages with `conda-build`.
</Tip>

1. If necessary, install the `anaconda-client` and `conda-build` packages by running the following command:

   ```sh theme={null}
   conda install anaconda-client conda-build
   ```

2. Choose the repository for which you would like to build the package. In this example, we use a small public [conda test package](https://github.com/Anaconda-Platform/anaconda-client/tree/master/example-packages/conda):

   ```sh theme={null}
   # Replace <PACKAGE> with the package name
   git clone https://github.com/Anaconda-Platform/anaconda-client
   cd anaconda-client/<PACKAGE>/conda/
   ```

   There are two required files in the example package: [meta.yaml](https://github.com/Anaconda-Platform/anaconda-client/blob/master/example-packages/conda/meta.yaml) and [build.sh](https://github.com/Anaconda-Platform/anaconda-client/blob/master/example-packages/conda/build.sh).

   macOS and Linux systems are Unix-like systems. Packages built for Unix-like systems require a `build.sh` file, packages built for Windows require a `bld.bat` file, and packages built for both Windows and Unix-like systems require both a `build.sh` file and a `bld.bat` file. All packages require a `meta.yaml` file.

3. To build the package, turn off automatic client uploading and then run the `conda build` command:

   ```sh theme={null}
   conda config --set anaconda_upload no
   conda build .
   ```

   All packages built using the `conda build` command are placed in a subdirectory of the [Anaconda](/getting-started/anaconda/main) `conda-bld` directory.

   <Tip>
     You can check where the resulting file was placed by adding the `--output` option:

     ```sh theme={null}
     conda build . --output
     ```
   </Tip>

4. Upload the test package to Anaconda.org by running the `anaconda upload` command:

   ```sh theme={null}
   anaconda login
   anaconda upload </PATH/TO/PACKAGE_NAME>.tar.bz2
   anaconda upload </PATH/TO/PACKAGE_NAME>.conda
   ```

   <Comments>
     Replace \</PATH/TO/PACKAGE\_NAME> with the correct file path and package name.<br />
     Packages can be uploaded with `.tar.bz`2 or `.conda` compression formats.
   </Comments>

For more information on the `.conda` format, see [Using the .conda compression format](https://docs.conda.io/projects/conda/en/latest/user-guide/concepts/packages.html#conda-file-format).

For more information on conda's overall build framework, see [Building conda packages](https://docs.conda.io/projects/conda-build/en/stable/concepts/recipe.html) in the official conda docs.

## Uploading standard Python packages

You can test standard Python package uploading with a small public example package saved in the [anaconda-client repository](https://github.com/Anaconda-Platform/anaconda-client/tree/master/example-packages/pypi).

Use Anaconda Prompt (Terminal on macOS/Linux) to perform the following steps:

1. Clone the repository:

   ```sh theme={null}
   # Replace <PACKAGE> with the package name
   git clone git@github.com:Anaconda-Platform/anaconda-client.git
   cd anaconda-client/<PACKAGE>/pypi/
   ```

2. Create your standard Python package using the `setup.py` script:

   ```sh theme={null}
   python setup.py sdist
   ```

3. Upload your newly built package tarball file:

   ```sh theme={null}
   anaconda upload dist/*.tar.gz
   ```

   Your package is now available at `http://anaconda.org/<USERNAME>/<PACKAGE>`, where `<USERNAME>` is your username and `<PACKAGE>` is the package name.

## Finding help for uploading packages

You can obtain a complete list of upload options, including:

* Package <Tooltip tip="A location (URL or file path) in a repository where conda looks for packages.">channel</Tooltip>
* <Tooltip tip="Part of the URLs on Anaconda.org where conda looks for packages. Labels are searched only if you specify a label.">Label</Tooltip>
* Availability to other users
* Metadata

To list the options, run the following in Anaconda Prompt (Terminal on macOS/Linux):

```sh theme={null}
anaconda upload -h
```
