I am using buildout to automatically download and setup the many dependencies of my Plone installation. buildout more or less uses easy_install to download and install a bunch o
For the packages, that you need to install in your virtualenv usually through a requirements.txt (or may be individually), you have to override your pip.conf file, usually located at ~/.pip/pip.conf
In your pip.conf file:
[global]
index-url=https://pypi.python.org/simple/
[install]
trusted-host=pypi.python.org
Here you can provide the url of your own custom version of pypi if needed.
If you wish to also use another pypi server while creating virtualenv through easy_install you need to override pydistutils.cfg file usually located at ~/pydistutils.cfg
In pydistutils.cfg file:
[easy_install]
index-url=https://pypi.python.org/simple/
This would ensure to create your venv with the url of pypi mentioned in pydistutils.cfg. Here, we're telling easy_install to use https://pypi.python.org/simple/ for creating venvs.