Reputation: 4479
I'm typing hg st as my regular ritual when working with Mercurial.
But today Mercurial is acting up 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
This same error appear when I type hg branches and any other hg commands. Do you know what is going on and how to solve this problem?
EDIT:
So I was running Mac OS X, and working with Xcode.
I have several Xcode versions in the machine,
some of them are Xcode4 (including Xcode beta versions).
I remember when I couldn't uninstall Xcode4 from script
I delete the Xcode4 folder manually, and then the error appear every time I type hg something.
EDIT: I uninstalled all Xcode versions, and Pythons still not working so I reInstall the OS, now it works.
Upvotes: 5
Views: 293
Reputation: 26597
Your Python installation is broken.
I don't know exactly what you've done for this to happen, but Python is unable to find the os
module, this has nothing specific to do with Mercurial.
Depending on your operating system, the easiest way to resolve this will be to reinstall Python from scratch.
Upvotes: 3