Cannot install mercurial properly - PYTHONPATH error
- by evident
Hi, I have a server running on Ubuntu 10.04 on which I wanted to install Mercurial via
% sudo apt-get install mercurial
It seems to have installed successfully and doesn't show me any error messages. But when I try it I get:
% hg
abort: couldn't find mercurial libraries in [/usr/bin /usr/lib/python2.6 /usr/lib/python2.6/plat-linux2 /usr/lib/python2.6/lib-tk /usr/lib/python2.6/lib-old /usr/lib/python2.6/lib-dynload /usr/lib/python2.6/dist-packages /usr/lib/pymodules/python2.6 /usr/local/lib/python2.6/dist-packages]
(check your install and PYTHONPATH)
I've googled for a while now and found some sites with the same problem but I still have no idea on how to fix it since it nowhere really says what I need to look for or what I need to add to my PYTHONPATH...
By the way, right now my PYTHONPATH seems to be empty:
% echo $PYTHONPATH
%
This is what I get if I look into my /usr/lib/ directory for mercurial:
% find /usr/lib/py* -name 'mercurial*'
/usr/lib/pymodules/python2.6/mercurial
/usr/lib/pymodules/python2.6/mercurial-1.4.3.egg-info
/usr/lib/pyshared/python2.6/mercurial
Can anybody please help me with that? What (and how) should I set my PYTHONPATH to? I already tried reinstalling, installing with "easy_install mercurial" or with "aptitude reinstall mercurial" but nothing helped. I always get this same error.
Would be great if anyone could help... thanks!
ADDITION:
Building from scratch didn't work out well... when I am logged in as root I can use hg, but when I access with my normal user I get:
% hg
Traceback (most recent call last):
File "/usr/local/bin/hg", line 4, in <module>
import pkg_resources
File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 2659, in <module>
parse_requirements(__requires__), Environment()
File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 546, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: mercurial==1.7.2