ImportError: No module named site ImportError: No module named site ImportError: No module named site
A google search brought up that it’s a Python module issue. I did a
locate site’ and found site.pyc. But, in apache2, I had my python code (for Django) using a virtualenv.
Recently, the virtualenv directory, “env”, had been killing by Dropbox sync. It just refused to sync that directory correctly – and it will damage it everwhere – so you need to use the Dropbox selective sync feature and don’t sync env. (I was syncing because I moved the directory, thus, breaking the previous settings to exclude env.)
So the fix was to create a new virtualenv, env, and use pip to install the packages there. You need to keep a list of packages and installation instructions, because this can happen.