Pypicache is a great way to host a local pypi repository. Unfortunately, it took some time for me to get it working under Ubuntu 10.04.
Pypicache is written for 2.7+, and ubuntu 10.04 uses 2.6. Lucikly, the only backwards incompatibility seems to be string formatting. Sooooo, get a copy of pypicache source and fix all the string formatting in the py files under the pypicache directory (alternatively, clone this: https://github.com/demelziraptor/pypicache – might be out of date so check first)
Then, while in the directory with your copy of pypicache, run pip install -r requirements.txt –use-mirrors
(Or ‘make init’ if you don’t mind it downloading all the dev requirements too.)
Then ‘make runserver’ to run the server in debug mode, with the target directory /tmp/pypicache
Test the server runs ok and you can use for whatever you want to use it for (in my case, a pip proxy). Then you can run it using ‘PYTHONPATH=. python -m pypicache.main /tmp/mypackages’
Getting the following error when trying to install paramiko on Ubuntu 10.04 (python 2.6.5) with pip – because of pycrypto dependancy:
warning: GMP or MPIR library not found; Not building Crypto.PublicKey._fastmath
Googling this problem leads to lots of results from Mac users, not to much from Ubuntu users. I don’t have this issue on Ubuntu 11.04 (python 2.7), so I assume it’s the python version.
apt-get install python-dev
Then try again!
Just a notice; if you try to apt-get install pip, it will get the wrong package.
If you try to apt-get install python-pip, it will get a very old version of pip.
Best thing to do; download and install manually: http://pypi.python.org/pypi/pip
Ubuntu 11.04 does not have this problem.
Alternatively, use apt-get install python-pip
Then upgrade it:
pip install –upgrade pip
If you do pip –version, it will probably still show 0.3.1
apt-get puts pip into /usr/bin/pip, and upgrading adds the new version to /usr/local/bin/pip (if I remember correctly), so what you can do:
mv /usr/bin/pip /usr/bin/pip-0.3.1
pip –version again should show you 1.2.1, or whatever the latest version is