如何在apache2中設定PythonPath

如何在apache2中設定PythonPath

我的 Ubuntu(12.04) 中的預設 Python 版本是 2.7 。對於python2.7項目,我是這樣配置的:

 <Location "/callcentre">
    SetHandler python-program
    PythonHandler django.core.handlers.modpython
    SetEnv DJANGO_SETTINGS_MODULE callcentre.settings
    PythonInterpreter callcentre
    PythonDebug On
    PythonPath "['/home/user/env/callcentreENV/lib/python2.7/site-packages','/home/user/env/callcentreENV/'] + sys.path"
  </Location> 

而且它工作得很好。

現在我想要的是使用 python3.2 建立一個新專案。我不知道如何在 appache 中配置它,因為 sys.path 指向預設的 python2.7

相關內容