I am software developer, I have started working on Centos 7. I use mercurial(hg) for code versioning. Suddenly the mercurial commands and all other python related commands have started giving this output error message:

`
Could not find platform independent libraries <prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
ImportError: No module named site`

I understand that I need to set Python home again. But I don't really know what to put here. export PYTHONHOME= ? I typed whereis python and I ve got this:

python: /usr/bin/python /usr/bin/python2.7 /usr/bin/python3.6 /usr/bin/python3.6m /usr/bin/python2.7-config /usr/lib/python2.7 /usr/lib/python3.6 /usr/lib64/python2.7 /usr/lib64/python3.6 /etc/python /usr/local/lib/python3.6 /usr/include/python2.7 /usr/include/python3.6m /usr/share/man/man1/python.1.gz

Then I tried to update PYTHONHOME with all those, then then /usr/bin/python3 only gave me this reduce message : ImportError: No module named site . But still I cannot use python related commands. I also have the error when I try reinstall the python(yum install).

Any clue on this issue please? Thank you in adavance

0

There are 0 best solutions below