Mercurial produces strange messages

I print hg st as a normal ritual when working with Mercurial.
But today Mercurial acts on me, it produces

Could not find platform independent libraries <prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
'import site' failed; use -v for traceback
Traceback (most recent call last):
  File "/usr/local/bin/hg", line 10, in <module>
    import os
ImportError: No module named os

The same error appears when I type hg branches and any other hg commands . Do you know what is happening and how to solve this problem?

EDIT:
So, I ran Mac OS X and worked with Xcode.
I have several versions of Xcode in the machine,
some of them are Xcode4 (including beta versions of Xcode).

I remember when I could not remove Xcode4 from the script,
I delete the Xcode4 folder manually, and then an error appears every time I type hg something .

EDIT: Xcode, Python , , .

+5
1

Python .

, , Python os, Mercurial.

Python .

+3

All Articles