# apache24, python3 and django21



## coyote_zed (Apr 2, 2019)

I am trying to figure out how to configure apache to work with the python3 version of django 2.1. I'm able to get django working properly but I'm having trouble understanding what the handbook says about configuring apache to work with django. The handbook says to add the following to httpd.conf:


```
<Location "/">
    SetHandler python-program
    PythonPath "['/dir/to/the/django/packages/ '] + sys.path"
    PythonHandler django.core.handlers.modpython
    SetEnv DJANGO_SETTINGS_MODULE mysite.settings
    PythonAutoReload On
    PythonDebug On
</Location>
```

What is meant by the '/dir/to/the/django/packages/' section? Any other info that could be helpful would be apreciated.


----------



## reddy (Apr 2, 2019)

From what I remember, python packages are not installed in a standard location such as /usr/local/bin, /usr/local/etc etc...
You can find the exact path by launching the python interpreter and then typing:


```
import sys
print sys.path
```

See this question specifically talking about Django. In this directory you should see your Django package and I think that this is the path the handbook refers to.


----------

