Mirroring a PyPI repository (AER 2.25)¶
Before you begin¶
You need to have already completed installing and configuring your Anaconda Repository instance. Due to the size of Anaconda Repository, it is important that you have configured a file storage location with sufficient disk space. If necessary please see the instructions for setting the file storage location.
The full PyPI mirror requires approximately 120GB.
The mirror command¶
To create a PyPI mirror run:
anaconda-server-sync-pypi
This will load all of the packages on pypi.python.org into the ~pypi binstar user account.
Verify that this is working by opening your browser to http://your.anaconda.repository/pypi/~pypi
NOTE: Replace your.anaconda.repository with the actual URL to your Anaconda Repository.
Alternately, you may not wish to mirror all packages. The license_blacklist feature is not available for PyPI due to the non-standardization of license metadata for these packages. To mirror a subset of the total repository, specify which platforms you want to include, or use the whitelist or blacklist functionality to control which packages are mirrored:
anaconda-server-sync-pypi --mirror-config /etc/binstar/mirrors/pypi.yaml
If necessary, refer to more information on whitelist, blacklist and license_blacklist functionality.
Configure pip¶
To configure pip to use this new mirror you must edit your ~/.pip/pip.conf file:
[global]
index-url = http://your.anaconda.repo:<port>/pypi/~pypi/simple
NOTE: Replace your.anaconda.repo
with the actual URL to your Anaconda Repository.