Delete "usr/lib/python2.7" byMistake, how to fix it? <p>During editting the Django apps, I deleted the python2.7 folder in "usr/lib/python2.7" by mistake.</p> <p>After that problem happened, I always got the msg as following when using :</p> <p><code>Could not find platform independent libraries &lt;prefix&gt; Could not find platform dependent libraries &lt;exec_prefix&gt; Consider setting $PYTHONHOME to &lt;prefix&gt;[:&lt;exec_prefix&gt;] ImportError: No module named site</code></p> <p>--- os is Ubuntu12.04 ----</p> <p>I have tried to refer to these pages:</p> <blockquote> <p><a href="http://bugs.python.org/issue6060" rel="nofollow">http://bugs.python.org/issue6060</a>,</p> <p><a href="http://stackoverflow.com/questions/21874407/python-ipython-importerror-no-module-named-site">Python/IPython ImportError: no module named site</a></p> </blockquote> <p>and also try to use</p> <p><code>sudo apt-get install --reinstall</code> to reinstall the python2.7.8 version</p> <p>My PYTHONPATH now looks like </p> <blockquote> <p>PYTHONDIR= usr/local/lib/python2.7,</p> <p>PYTHONHOME= usr/local/lib/python2.7,</p> <p>PYTHONPATH=</p> </blockquote> <p>but I still get "ImportError: No module named site" msg</p> <p>If I try to type </p> <pre><code>Import sys </code></pre> <p>I would get the msg "import: unable to open image `sys': @ error/blob.c/OpenBlob/2587."</p> <h2>I want to know what is my problem now, and how to fix it?</h2> <p>Many thanks,</p>