lidongok

使用Mod_python 调用 MySqldb 出现PYTHON_EGG_CACHE environment 权限问题的解决方法
lidongok | Oct 8, 2007 4:17:46 PM
下面的内容是转载的。 http://threebit.net/mail-archive/trac/msg00144.html
下面的那个大虾太酷了,不去解压缩那个egg的文件了。也不用设置PYTHON_EGG_CACHE 环境变量了,直接就把egg文件给解压缩好了,这样大家都开心,这个办法真好。我用了,的确解决了我的问题。

> Here's what I did.  I reasoned that the egg file is unpacked so that
> some of its files are available as real files in the file system, and I
> wasn't getting any bonus points for having the egg present in python's
> site-packages directory as a file anyway.  So:
> 
> cd /path/to/python/site-packages
> mv pysqlite-2.0.7-py2.4-linux-i686.egg foo.zip
> mkdir pysqlite-2.0.7-py2.4-linux-i686.egg
> cd pysqlite-2.0.7-py2.4-linux-i686.egg
> unzip ../foo.zip
> rm ../foo.zip
> 
> Now the egg file is unpacked, so the files are all present already in
> the filesystem, nothing needs to be unpacked, PYTHON_EGG_CACHE is
> irrelevant, and everybody is happy.
> 
> Perhaps that would work for you as well?
> 
> --
> Brett Neumeier <random (at) rnd.cx>

That does work, and thanks. I am sort of intellectually curious though as
to why the python interpreter is not honouring the environment variable.

Jeremy

Comment: (no reply)
To post your comment, Please login first.