我已经安装了 mod_python,但是当我尝试使用它时:
例如。
>>>import mod_python
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named mod_python
-
[root@lab6 /]# yum install mod_python
Loaded plugins: rhnplugin, security
Setting up Install Process
Package mod_python-3.2.8-3.1.x86_64 already installed and latest version
Nothing to do
即使我已经将它安装在 Redhat 服务器中,我也无法导入它。
它应该被用来在 Redhat 服务器中部署 Django,并带有这个 httpd.conf 条目:
<VirtualHost mritest2.domain.ch:80>
ServerName mritest2.domain.ch
DocumentRoot /home/django_www/hardi
<Location "/">
SetHandler python-program
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE mri.settings
PythonDebug On
PythonPath "['/home/django_www', '/home/django_www/hardi'] + sys.path"
</Location>
<Location "/static/">
SetHandler None
</Location>
</VirtualHost>