我有PHP調用一個python腳本,或者它的調用腳本,但麻煩的地方中途停止,我的用戶.bash_profile中,該指南以下How do you fix a Trac installation that begins giving errors relating to PYTHON_EGG_CACHE?問題Python導入(MySQLdb的)和Apache python_egg_cache
export PYTHON_EGG_CACHE /var/www/html/path/cache
並HTTPD.CONF
AddHandler mod_python
SetEnv PYTHON_EGG_CACHE /var/www/html/path/cache
我仍然收到此錯誤信息,Web服務器仍然嘗試訪問/root/.python-eggs ,我不能找到我的出口.python雞蛋在我的新文件夾
Array
(
[stdout] =>
[stderr] => Traceback (most recent call last):
File "/var/www/html/grndb/upscgenesearch/python/pythontest.py", line 4, in ?
import MySQLdb
File "build/bdist.linux-x86_64/egg/MySQLdb/__init__.py", line 19, in ?
File "build/bdist.linux-x86_64/egg/_mysql.py", line 7, in ?
File "build/bdist.linux-x86_64/egg/_mysql.py", line 4, in __bootstrap__
File "/usr/lib/python2.4/site-packages/pkg_resources.py", line 799, in resource_filename
return get_provider(package_or_requirement).get_resource_filename(
File "/usr/lib/python2.4/site-packages/pkg_resources.py", line 1229, in get_resource_filename
return self._extract_resource(manager, zip_path)
File "/usr/lib/python2.4/site-packages/pkg_resources.py", line 1249, in _extract_resource
real_path = manager.get_cache_path(
File "/usr/lib/python2.4/site-packages/pkg_resources.py", line 880, in get_cache_path
self.extraction_error()
File "/usr/lib/python2.4/site-packages/pkg_resources.py", line 846, in extraction_error
raise err
pkg_resources.ExtractionError: Can't extract file(s) to egg cache
的而試圖提取文件(S)到Python的蛋 緩存出現以下錯誤:
[Errno 13] Permission denied: '/root/.python-eggs'
Python的雞蛋緩存目錄當前設置爲:
/root/.python-eggs
也許您的帳戶沒有對此目錄的寫入權限?您可以通過將PYTHON_EGG_CACHE環境變量 更改爲指向可訪問的目錄來更改緩存目錄。
我在開始這個線程之前遵循了PYTHON_EGG_CACHE的指南,它沒有工作。緩存文件夾沒有改變 而且儘管錯誤信息的輸出看起來很簡潔,但是我並不認爲安裝了Genshi或Trac,至少我找不到我服務器上的任何文件 – 2011-04-18 08:11:18
上面的編輯。 – agnul 2011-04-19 16:14:02