cached eggs

by admin

I Ran into a snafu when installing the mysql_python egg from pypi. I believe this issue relates to any egg that remains packed after install.

What happens is that a cache directory is created under the user that runs the install. Typically root, or some other privileged user that can write to Python’s site-packages dir. This cache dir, is thus inaccessible to the web server’s unprivileged account: consequently code running under mod_python, for example, cannot  access the cache dir and hence the library.

One option is to create a system wide env variable, PYTHON_EGG_CACHE, and point it to some accessible directory. I believe easy_install respects this and will use it to create the cache location for the library or app that is being downloaded.

I found an easier solution. Use easy_install with the forced unpacking option to write the unpacked library into site-packages. This means the code is visible to all Python users without the need of cache directories or env. variables. (easy_install -Z yourpackage).

If you need to delete existing eggs so you can retry the install as suggested, then you need to remove the offending egg from site-packags and also from the .pth file containing a reference to it–also in site-packages.


by admin

I’m no particular fan of Henry Blodget but he’s clearly articulate and smart, savvy even. I wouldn’t go all gaga just yet a la motley fool and have him advise on my portfolio—if indeed he’s technically allowed to. But I do agree with some of his pronouncements and I think he’s bang on about Microsoft, Yahoo and the Cloud

Microsoft is becoming the new IBM. And if Blodget is right, and I think he is, they would have decimated Yahoo and destroyed $billions of value in the process. Yahoo’s assets are its people and their continuously evolving products. The two are inseparable and the loss of key product and engineering staff would have left Microsoft with a quickly atrophying asset. A mass exodus would have been an almost certainty given the cultural gulf between the organizations.

One of the key difference between them is that Microsoft’s revenue is not coming primarily from the consumer web space whereas Yahoo’s is. Microsoft’s corporate customers are much less fickle than the web audience served by Yahoo, Google et al. The latter are already fully in the cloud with all the concomitant benefits and disadvantages that brings—-notably that by giving the customer genuine agility, you now have earn their loyalty every day if you want to sustain a revenue stream from them.