“ERROR:root:code for hash md5 was not found” when using any hg mercurial commands

前端 未结 11 1833
臣服心动
臣服心动 2020-12-02 04:05

When trying to use any hg Mercurial commands on the console, I keep getting this error. I installed Python using Homebrew and I am running Mac OS Catalina v. 1

相关标签:
11条回答
  • 2020-12-02 04:59

    I had this issue recently (2020, May) with Google's GCP CLI. It also works on the obsolete Python 2.7.

    This is a borked Python 2 installation problem. mBrew no longer correctly installs Python 2 gracefully, as no one cares about abondonware.

    Conda still installs Python 2 in an environment; I did that.

    0 讨论(0)
  • 2020-12-02 05:00

    When I would import hashlib I would see an error message stating that hash md5 was not found.

    I was able to fix this problem by first unlinking openssl: brew unlink openssl

    Then I uninstalled python 2.7 using MacPorts: sudo port uninstall python27

    Then I installed python 2.7 using MacPorts: sudo port install python27

    Now importing hashlib works :)

    0 讨论(0)
  • 2020-12-02 05:00

    On macOS Mojave (10.14.6), this worked for me:

    • Save the file as python@2.rb in your current directory.
    • brew reinstall python@2.rb
    • I was using virtual environments, so I had to link them back to /usr/local/bin/python and /usr/local/bin/pip for python and pip binaries.
    0 讨论(0)
  • 2020-12-02 05:02

    My problem was having pyenv installed and pointing to an old python 2 version

    Uninstall python@2 (python2 was EOL since Jan 1st, 2020)

    $ brew uninstall python@2
    Uninstalling /usr/local/Cellar/python@2/2.7.15_1... (4,169 files, 76.0MB)
    

    then

    $ pyenv versions
      system
    * 2.7.12 (set by /Users/admin/.python-version)
      3.4.5
      3.7.7
    
    $ pyenv local system
    $ pyenv global system
    
    0 讨论(0)
  • 2020-12-02 05:04

    Managed to fix this by first unlinking openssl

    brew unlink openssl
    

    And then reinstalling python

    brew reinstall python@2
    

    I also noticed that when running 'brew doctor' there was a warning related to an openssl folder found in /usr/local/include/node/. I deleted this folder before running the above commands (not sure if related)

    0 讨论(0)
提交回复
热议问题