Mirroring a PyPI repository (AER 2.32)¶
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:
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
NOTE: Replace your.anaconda.repository with the actual URL to your Anaconda Repository.
Customizing the mirror¶
It is possible to customize the mirror behavior by creating a configuration file such as
$PREFIX/etc/anaconda-server/mirror/pypi.yaml and using the
anaconda-server-sync-pypi --mirror-config /etc/binstar/mirrors/pypi.yaml
The following configuration options are available:
||The local user under which the PyPI packages are
||A list of packages to mirror. Only packages listed are
mirrored. If the list is empty, all packages are
||A list of packages to skip. The packages listed are
||Only download the latest versions of the packages.
||The URL of the PyPI mirror.
||A custom value for XML RPC URL. If this value is
present, it takes precedence over the URL built using
||A custom value for the simple index URL. If this value
is present, it takes precedence over the URL built
||Whether to use the XML RPC API as specified by
If this is set to
||Whether to use the serial number provided by the XML
RPC API. Only packages updated since the last serial
saved will be checked. If this is set to false all
PyPI packages are going to be checked for updates.
||Create the mirror user as an Organization instead of a
regular user account. All superusers are added to the
“Owners” group of the organization.
whitelist: - requests - six - numpy - simplejson latest_only: true remote_url: http://pypimirror.local/ use_xml_rpc: false
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
your.anaconda.repo with the actual URL to your Anaconda Repository.