Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to run hg due to "ImportError: No module named osutil"

I'm getting the following error when trying to run any hg command.

I tried to uninstall & install again XCode and the dev-tools.

Traceback (most recent call last):
File "/usr/local/bin/hg", line 41, in <module>
mercurial.util.setbinary(fp)
File "/usr/local/lib/python2.7/site-packages/mercurial/demandimport.py", line 102, in __getattribute__
File "/usr/local/lib/python2.7/site-packages/mercurial/demandimport.py", line 74, in _load
File "/usr/local/lib/python2.7/site-packages/mercurial/demandimport.py", line 43, in _hgextimport
File "/usr/local/lib/python2.7/site-packages/mercurial/util.py", line 66, in <module>
File "/usr/local/lib/python2.7/site-packages/mercurial/demandimport.py", line 102, in __  getattribute__
File "/usr/local/lib/python2.7/site-packages/mercurial/demandimport.py", line 74, in _load
File "/usr/local/lib/python2.7/site-packages/mercurial/demandimport.py", line 43, in _hgextimport
ImportError: No module named osutil

osutil.so exist on /usr/local/lib/python2.7/site-packages/mercurial.

like image 610
gmeroz Avatar asked Jan 05 '15 12:01

gmeroz


1 Answers

osutil is part of mercurial. Go to the folder where you downloaded mercurial and run

make local

Make sure that it runs correctly and you should be good to go.

like image 66
lc2817 Avatar answered Oct 05 '22 10:10

lc2817