uv under the hood for PyPI package resolution. Configure PyPI-specific settings to control index URLs, keyring access, and secure connections.
PyPI Configuration
index-url
Set the default PyPI index URL for new projects.Default PyPI index URL added to manifest on
pixi initUnlike pip,
index-url is not a global setting. It only modifies the pixi.toml/pyproject.toml file during initialization. This ensures manifest files remain complete and reproducible.extra-index-urls
Additional PyPI indexes to check for packages.List of additional index URLs added to manifest on
pixi initExample: Custom PyPI Mirror
Keyring Integration
Use the Pythonkeyring package to store and retrieve PyPI credentials.
Available options:
disabled: Don’t use keyring (default)subprocess: Use keyring via subprocess
This is the only pypi-config setting that acts globally. Other settings only affect manifest initialization.
How Keyring Works
- Pixi invokes the
keyringcommand-line tool - Keyring looks up credentials for the PyPI host
- Credentials are passed to
uvfor authentication
Requirements
- Python
keyringpackage must be installed - Keyring CLI must be in PATH
- Credentials must be stored in the system keyring
TLS and Security
allow-insecure-host
Disable TLS certificate verification for specific PyPI hosts.List of hostnames (without protocol or port) to skip TLS verification
Use Case: Internal PyPI with Self-Signed Certificate
Global TLS Disable
For disabling TLS globally (affects both conda and PyPI):Resolution Behavior
Index Priority
When multiple indexes are configured:index-urlis checked firstextra-index-urlsare checked in order- First match wins
Version Selection
Pixi usesuv’s resolution algorithm:
- Latest compatible version is selected
- Pre-releases are excluded unless explicitly requested
- Platform-specific wheels are preferred over sdist
Complete Configuration Example
Troubleshooting
Package Not Found
- Check if package exists in configured indexes
- Verify index URLs are correct and accessible
- Ensure authentication is configured if required
- Check if extra-index-urls are needed
Authentication Failures
- Verify keyring is installed:
keyring --version - Check credentials are stored:
keyring get https://pypi.org/simple __token__ - Test with inline credentials temporarily:
TLS Certificate Errors
Error:SSL: CERTIFICATE_VERIFY_FAILED
Solutions:
- Preferred: Add host to
allow-insecure-host - Alternative: Use
tls-no-verify = true(less secure) - Best: Install proper CA certificates and use
tls-root-certs = "native"
CDN Redirect Issues
If your PyPI mirror redirects to a CDN:Environment Variables
PyPI configuration can also be influenced by environment variables:PIP_INDEX_URL: Override index URL (pip compatibility)PIP_EXTRA_INDEX_URL: Additional indexes (pip compatibility)UV_INDEX_URL: UV-specific index URLPIXI_TLS_ROOT_CERTS: TLS root certificates setting
Best Practices
Production Environments
- Use dedicated PyPI mirror for reliability and speed
- Configure authentication via keyring, not inline credentials
- Pin index URLs in manifest for reproducibility
- Test resolution before deploying
Corporate Networks
- Use internal PyPI mirror to cache packages
- Configure certificate trust with
tls-root-certs = "native" - Document index configuration for team members
- Set up fallback indexes for availability
CI/CD Pipelines
- Use environment variables for credentials:
- Cache packages to speed up builds
- Use locked dependencies for reproducibility: