Uploading and installing standard Python packages
To work with standard Python packages, you must use the corresponding subdomain https://pypi.anaconda.org
. To install standard Python packages from the user travis
, for example, use the repository URL https://pypi.anaconda.org/travis
.
Uploading standard Python packages
We can test standard Python package uploading with a small public example package saved in the anaconda-client repository.
Use Anaconda Prompt (Terminal on macOS/Linux) to perform the following steps:
-
Begin by cloning the repository from the command line:
-
You can now create your standard Python package with the
setup.py
script: -
The package has now been built as a source tarball and is ready to be uploaded:
Your package is now available at
http://anaconda.org/<USERNAME>/<PACKAGE>
, where<USERNAME>
is your username and<PACKAGE>
is the package name.
Installing standard Python packages
The best way to install a standard Python package is using pip
. For the following command, we use the package we authored in the examples above. Open Anaconda Prompt (Terminal on macOS/Linux) and run the following command:
Installing private standard Python packages
The best way to manage access or make standard Python packages and other packages private is to create organizations or groups, which allow you to set separate permissions per package.
You can also control access with the token system. All Anaconda.org URLs can be appended with /t/$TOKEN
to access private packages.
Open Anaconda Prompt (Terminal on macOS/Linux) and run the following command:
Working with standard Python wheel files
When Anaconda Client uploads a wheel file, it uses the standard Python compliant package name format. This replaces any underscores (_) and periods (.) with dashes (-). If you need to add a wheel file to an already-existing conda package and that package name contains underscores or periods, specify the package name with the --package
or -p
flag.
Finding help for uploading packages
You can obtain a complete list of upload options, including:
- Package channel
- Label
- Availability to other users
- Metadata
To list the options, run the following in Anaconda Prompt (Terminal on macOS/Linux):
Was this page helpful?