PyPI Blues!

There are times when your administrator blocks the sites that have packages indexes. The same thing happened to me a couple of days back when the main PyPI was blocked off and I could not either do a pip or easy_install of any python packages. I tussled with the Admins and all was doing was hitting the wall. I this sounds familiar, I have a solution for you.

Luckily python packages indexes are mirrored and there are many indexes all around. But some of the popular ones you could find them here. All you have to do is the following.

In the ~/.pip directory create a pip.conf file, if you dont have one yet, or edit it, to have the following line.

[global]
index-url = http://mirror.picosecond.org/pypi/simple

Now try to get install something using pip.

$ pip install wtf
Downloading/unpacking wtf
  http://mirror.picosecond.org/pypi/simple/wtf/ uses an insecure transport scheme (http). Consider using https if mirror.picosecond.org has it available
  Downloading wtf-0.1.tar.gz
  Running setup.py (path:/opt/sandbox/python/build/wtf/setup.py) egg_info for package wtf

Installing collected packages: wtf
  Running setup.py install for wtf

Successfully installed wtf
Cleaning up..

I had chosen mirror.picosecond.org/pypi mirror but you are free to choose anything you wish. Enjoy!

Show Comments