If CherryPy is pure Python, then you may be able to simply put the cherrypy
folder in the same place your project resides. This will enable you to import
the necessary things from CherryPy without needing to copy it to the official install directory. I've personally never used CherryPy, so I don't know precisely what's being installed and how it's used, but I've done this same thing with Django without a hitch.
OK, I just downloaded CherryPy 3.1.2, unzipped it, and copied the contents of ./cherrypy/tutorial
to .
, ran the suggested tut101_helloworld.py and it seems to work.
As far as hooking it up to Apache, it depends on what's available on your host. I think the most common Python interface is mod_python
. When following these instructions, it's important to set the sys.path
right in order for mod_python
to be able to see cherrypy
.