Reply to comment

ImportError: No module named site (Python, Apache2, Django, virtualenv, Dropbox)

I was getting a lot of this error:

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.

Reply

The content of this field is kept private and will not be shown publicly.
  • Lines and paragraphs break automatically.

More information about formatting options

5 + 12 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.