I'm using Windows XP with installed Mercurial TortoiseHg on it. Now I need to install the external activity extension. I downloaded the extension and enabled it in hgrc.
When I'm try to call it using command:
hg activity
I receive the following error:
There are 292 changesets
Hg activity options: you need matplotlib in your python path in order to use the hg activity extension.
Then I installed the python 2.6 and matplotlib. So the paths of them are:
Now I don't know how to tell mercurial activity extension to use matplotlib from that location? I found some explanation in the TortoiseHg FAQ, under the heading "Where do TortoiseHg extensions look for external Python modules on Windows?"
But when I do the steps that are written there I receive the same error message as above.
I tried the approach and seems to work fine.
You will need to include the path as
import sys
sys.path.append(r'C:\Python26\Lib\site-packages')
Also see the following code @ http://bitbucket.org/tortoisehg/stable/src/cf4b3dfd15ee/contrib/hg
# enable importing on demand to reduce startup time
try:
from mercurial import demandimport; demandimport.enable()
except ImportError:
sys.stderr.write("abort: couldn't find mercurial libraries in [%s]\n" %
' '.join(sys.path))
sys.stderr.write("(check your install and PYTHONPATH)\n")
sys.exit(-1)
You should be able to add the following path (D:\Python26\Lib\site-packages) in PYTHONPATH environment variable too.
This should allow python bundled with TortoiseHg to look at non-standard paths outside the bundled directory.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With