Defining PYTHONPATH for http requests on a shared server
I'm installing Django on Bluehost and one of the steps to install it was to install flup on their server. I did so and everything works great when I'm logged in via the SSH. However when I actually hit the page in my browser it can't find flup. I get this error in the server log:
ERROR: No module named flup. Unable to load the flup package. In order to run django as a FastCGI application, you will need to get flup from http://www.saddi.com/software/flup/ If you've already installed flup, then make sure you have it in your PYTHONPATH.
Since it recognizes flup when I'm in the SSH my best guess is that there's some other bash file I need to change to get PYTHONPATH poi开发者_StackOverflow社区nting to the right places for the http request. But since it's a shared server I don't have a whole lot of privileges outside of my home directory.
Any ideas?
If you can identify what module exactly is trying to import flup
, you can prepend that import with a sys.path.append
of the path to which you have installed flup
-- as long as the sys.path.append
happens before the import flup
, you're in clover.
精彩评论