Egg cache problem with mod_python/ez_setup

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Manuzhai

    #1

    Egg cache problem with mod_python/ez_setup

    Hello there,

    I have this weird problem with a mod_python application.

    Recently I installed ElementTree and cElementTree through ez_setup.py,
    even though they were already installed normally (this might not be too
    smart, but I don't think it's related to my actual problem).

    I have a web application written on top of mod_python that uses
    cElementTree for several things. After installing cElementTree through
    ez_setup.py, it turns out that I got this Exception on the site:

    (most relevant info at the end, obviously, it's quite lengthy)

    Mod_python error: "PythonHand ler equilex"

    Traceback (most recent call last):

    File "/usr/lib/python2.4/site-packages/mod_python/apache.py", line
    287, in HandlerDispatch
    log=debug)

    File "/usr/lib/python2.4/site-packages/mod_python/apache.py", line
    464, in import_module
    module = imp.load_module (mname, f, p, d)

    File "/var/www/equilex.eu/http/equilex/__init__.py", line 2, in ?
    from equilex.model import Session

    File "/var/www/equilex.eu/http/equilex/model/__init__.py", line 4, in ?
    from page import Page

    File "/var/www/equilex.eu/http/equilex/model/page.py", line 1, in ?
    from menu import Menu

    File "/var/www/equilex.eu/http/equilex/model/menu.py", line 1, in ?
    import cElementTree as et

    File "build/bdist.linux-i686/egg/cElementTree.py ", line 7, in ?

    File "build/bdist.linux-i686/egg/cElementTree.py ", line 4, in
    __bootstrap__

    File
    "/usr/lib/python2.4/site-packages/setuptools-0.6b2-py2.4.egg/pkg_resources.p y",
    line 799, in resource_filena me
    return get_provider(pa ckage_or_requir ement).get_reso urce_filename(

    File
    "/usr/lib/python2.4/site-packages/setuptools-0.6b2-py2.4.egg/pkg_resources.p y",
    line 1228, in get_resource_fi lename
    self._extract_r esource(manager , self._eager_to_ zip(name))

    File
    "/usr/lib/python2.4/site-packages/setuptools-0.6b2-py2.4.egg/pkg_resources.p y",
    line 1249, in _extract_resour ce
    real_path = manager.get_cac he_path(

    File
    "/usr/lib/python2.4/site-packages/setuptools-0.6b2-py2.4.egg/pkg_resources.p y",
    line 880, in get_cache_path
    self.extraction _error()

    File
    "/usr/lib/python2.4/site-packages/setuptools-0.6b2-py2.4.egg/pkg_resources.p y",
    line 846, in extraction_erro r
    raise err

    ExtractionError : Can't extract file(s) to egg cache

    The following error occurred while trying to extract file(s) to the
    Python egg
    cache:

    [Errno 13] Permission denied: '/var/www/.python-eggs'

    The Python egg cache directory is currently set to:

    /var/www/.python-eggs

    Perhaps your account does not have write access to this directory? You can
    change the cache directory by setting the PYTHON_EGG_CACH E environment
    variable to point to an accessible directory.

    Now, I already had a /tmp/eggs dir for eggs, and I had a SetEnv
    directive in my vhost config for my Trac vhost (which uses eggs). So I
    moved the SetEnv directive from the vhost config to my global
    httpd.conf. Curious enough, after restarting apache2, I still got the
    same error!! Is there any reason why it may not be picking up the env
    variable that points it to the other directory?

    Regards,

    Manuzhai

Working...