Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4023160
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T10:33:52+00:00 2026-05-20T10:33:52+00:00

A bizarre import error is preventing me from installing a mercurial extension. I’m trying

  • 0

A bizarre import error is preventing me from installing a mercurial extension.

I’m trying to get the mercurial_keyring extension running so that I don’t have to type in my user name and password every time I use mercurial for a project.

I’m using Python 2.7.1. I installed mercurial with the binary provided at https://www.mercurial-scm.org/.

I installed keyring and mercurial_keyring with pip.

I first tried to add the extension by adding this to ~/.hgrc:

[extensions]
...
mercurial_keyring = 

as indicated in the installation instructions here. However, I got the following error:

*** failed to import extension mercurial_keyring: No module named mercurial_keyring

From the same installation instructions, I tried pointing mercurial directly to the mercurial_keyring.py file, which worked.

[extensions]
...
hgext.mercurial_keyring = /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial_keyring.py

And things seemed to be moving along.

However, when I try to execute any mercurial commands requiring my password so that it will be saved by keyring (e.g. hg pull, hg push) I get the error

abort: No module named keyring!

The most confusing part is that there is a clear

import keyring

in line 28 of mercurial_keyring.py that is resolved without any problems. In fact, any import keyring succeeds outside classes and methods and fails inside them!

Just for the sake of thoroughness, I’ll mention that this error arises in the mercurial_keyring.py in the PasswordStore class in the get_http_password method when the following is attempted

return keyring.get_password(...)

Any thoughts?

I have the feeling that I’m missing something obvious, but I’ve spent a good deal of time trying to figure this out and google has not been particularly helpful so far. Any input will be greatly appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T10:33:53+00:00Added an answer on May 20, 2026 at 10:33 am

    Most likely, hg is running using the system python (2.6) rather than the copy of 2.7 you have installed.

    Try installing mercurial_keyring and keyring under 2.6, and see if that gets things working as expected.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This behavior is so bizarre that I don't even know how best to ask
I have a strange issue. I'm trying to get Apple Push Notifications working with
I have a bizarre problem that is doing my head in. I have the
This is a somewhat bizarre question. My objectives are to understand the language design
For some strange, bizarre reason, my images in my website just will not display
I have been using Hibernate very successfully, but today I noticed a bizarre phenomenon
Let's say that I have this string: s = '<p>Hello!</p>' When I pass this
I have been trying to left align buttons contained in a Box to the
The bizarre symptom I'm seeing on this page (only when viewing with IE 6)
I have a bizarre problem: Somewhere in my HTML/PHP code there's a hidden, invisible

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.