Autojump: hash md5 error on Mac

Created on 13 Jun 2018  ·  34Comments  ·  Source: wting/autojump

I install autojump and it works quite well until today.
Every time I open a directory a mass of python error msg is printed to the terminal.
I install buck and watchman with homebrew today.

If I uninstall autojump, the error msg dismiss.
Is there any way to fix it?


The detail of error msg is as following:

ERROR:root:code for hash md5 was not found.
Traceback (most recent call last):
File "/usr/local/Cellar/python@2/2.7.15/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 147, in
globals()[__func_name] = __get_hash(__func_name)
File "/usr/local/Cellar/python@2/2.7.15/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type md5
ERROR:root:code for hash sha1 was not found.
Traceback (most recent call last):
File "/usr/local/Cellar/python@2/2.7.15/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 147, in
globals()[__func_name] = __get_hash(__func_name)
File "/usr/local/Cellar/python@2/2.7.15/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha1
ERROR:root:code for hash sha224 was not found.
Traceback (most recent call last):
File "/usr/local/Cellar/python@2/2.7.15/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 147, in
globals()[__func_name] = __get_hash(__func_name)
File "/usr/local/Cellar/python@2/2.7.15/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha224
ERROR:root:code for hash sha256 was not found.
Traceback (most recent call last):
File "/usr/local/Cellar/python@2/2.7.15/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 147, in
globals()[__func_name] = __get_hash(__func_name)
File "/usr/local/Cellar/python@2/2.7.15/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha256
ERROR:root:code for hash sha384 was not found.
Traceback (most recent call last):
File "/usr/local/Cellar/python@2/2.7.15/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 147, in
globals()[__func_name] = __get_hash(__func_name)
File "/usr/local/Cellar/python@2/2.7.15/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha384
ERROR:root:code for hash sha512 was not found.
Traceback (most recent call last):
File "/usr/local/Cellar/python@2/2.7.15/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 147, in
globals()[__func_name] = __get_hash(__func_name)
File "/usr/local/Cellar/python@2/2.7.15/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha512
/Users/huxuyang/dev/BeautyCamera
➜ BeautyCamera git:(feature-v1.7.7) ✗ ERROR:root:code for hash md5 was not found.
Traceback (most recent call last):
File "/usr/local/Cellar/python@2/2.7.15/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 147, in
globals()[__func_name] = __get_hash(__func_name)
File "/usr/local/Cellar/python@2/2.7.15/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type md5
ERROR:root:code for hash sha1 was not found.
Traceback (most recent call last):
File "/usr/local/Cellar/python@2/2.7.15/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 147, in
globals()[__func_name] = __get_hash(__func_name)
File "/usr/local/Cellar/python@2/2.7.15/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha1
ERROR:root:code for hash sha224 was not found.
Traceback (most recent call last):
File "/usr/local/Cellar/python@2/2.7.15/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 147, in
globals()[__func_name] = __get_hash(__func_name)
File "/usr/local/Cellar/python@2/2.7.15/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha224
ERROR:root:code for hash sha256 was not found.
Traceback (most recent call last):
File "/usr/local/Cellar/python@2/2.7.15/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 147, in
globals()[__func_name] = __get_hash(__func_name)
File "/usr/local/Cellar/python@2/2.7.15/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha256
ERROR:root:code for hash sha384 was not found.
Traceback (most recent call last):
File "/usr/local/Cellar/python@2/2.7.15/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 147, in
globals()[__func_name] = __get_hash(__func_name)
File "/usr/local/Cellar/python@2/2.7.15/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha384
ERROR:root:code for hash sha512 was not found.
Traceback (most recent call last):
File "/usr/local/Cellar/python@2/2.7.15/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 147, in
globals()[__func_name] = __get_hash(__func_name)
File "/usr/local/Cellar/python@2/2.7.15/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha512

invalid packaging-homebrew

Most helpful comment

This fixed it for me: brew reinstall python@2

All 34 comments

The reason seems to be OS X use ssl lib of its own instead of openssl. Thus if we brew install openssl, the two lib conflict. Walk around can be found here: https://github.com/dotnet/cli/issues/3964#issuecomment-236493536

This issue can be close now, thanks.

Thanks for sharing the root cause.

ERROR:root:code for hash md5 was not found.
Traceback (most recent call last):
File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 147, in
globals()[__func_name] = __get_hash(__func_name)
File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type md5
ERROR:root:code for hash sha1 was not found.
Traceback (most recent call last):
File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 147, in
globals()[__func_name] = __get_hash(__func_name)
File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha1
ERROR:root:code for hash sha224 was not found.
Traceback (most recent call last):
File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 147, in
globals()[__func_name] = __get_hash(__func_name)
File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha224
ERROR:root:code for hash sha256 was not found.
Traceback (most recent call last):
File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 147, in
globals()[__func_name] = __get_hash(__func_name)
File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha256
ERROR:root:code for hash sha384 was not found.
Traceback (most recent call last):
File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 147, in
globals()[__func_name] = __get_hash(__func_name)
File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha384
ERROR:root:code for hash sha512 was not found.
Traceback (most recent call last):
File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 147, in
globals()[__func_name] = __get_hash(__func_name)
File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha512

Same issue, works after removing python@2 brew uninstall python@2.

This fixed it for me: brew reinstall python@2

This fixed it for me: brew reinstall python@2

Thank you!

This fixed it for me: brew reinstall python@2

Thanks, worked for me!

This fixed it for me: brew reinstall python@2

Thanks, worked for me too! Happy New Year 2020!!!

why did reinstalling python worked!

因为俺使用的是:pyenv.

所以使用 pyenv install -f 2.7.17 来解决我的问题

This fixed it for me: brew reinstall python@2

Worked for me as well, Gracias!!

This fixed it for me: brew reinstall python@2

worked for me too! Thanks!

This fixed it for me: brew reinstall python@2

Fixed. Thank you.

not for me?

➜  LandUse git:(country) ✗ brew reinstall python@2
==> Reinstalling python@2 
Error: An exception occurred within a child process:
  FormulaUnavailableError: No available formula with the name "/usr/local/opt/python@2/.brew/[email protected]" 

Same here:

Error: An exception occurred within a child process:
FormulaUnavailableError: No available formula with the name "/usr/local/opt/python@2/.brew/[email protected]"

Same here:

Error: An exception occurred within a child process:
FormulaUnavailableError: No available formula with the name "/usr/local/opt/python@2/.brew/[email protected]"

save the file as [email protected] in your OSX

https://raw.githubusercontent.com/Homebrew/homebrew-core/94d572a132a63651739fef1931f540404b7eaa31/Formula/python%402.rb

then

brew reinstall [email protected]

It works for me to resolve the error "ERROR:root:code for hash md5 was not found.".
Just a little confuse to brew version control.

@slixurd your solution worked for me as well, thank you!

I also learned that you can install a package via brew from a file, nifty solution 👍

sorry @slixurd @chrisnankervis where exactly do i have to save that ruby script you link to above on my computer? thanks

sorry @slixurd @chrisnankervis where exactly do i have to save that ruby script you link to above on my computer? thanks

any place. just run the command brew reinstall [email protected] in the same directory.

@slixurd Thanks

@slixurd Worked for me. Thanks!

Error: An exception occurred within a child process:
FormulaUnavailableError: No available formula with the name "/usr/local/Cellar/python@2/2.7.15_1/.brew/[email protected]"

ERROR:root:code for hash md5 was not found.
Traceback (most recent call last):
File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 147, in
globals()[__func_name] = __get_hash(__func_name)
File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type md5
ERROR:root:code for hash sha1 was not found.
Traceback (most recent call last):
File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 147, in
globals()[__func_name] = __get_hash(__func_name)
File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha1
ERROR:root:code for hash sha224 was not found.
Traceback (most recent call last):
File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 147, in
globals()[__func_name] = __get_hash(__func_name)
File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha224
ERROR:root:code for hash sha256 was not found.
Traceback (most recent call last):
File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 147, in
globals()[__func_name] = __get_hash(__func_name)
File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha256
ERROR:root:code for hash sha384 was not found.
Traceback (most recent call last):
File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 147, in
globals()[__func_name] = __get_hash(__func_name)
File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha384
ERROR:root:code for hash sha512 was not found.
Traceback (most recent call last):
File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 147, in
globals()[__func_name] = __get_hash(__func_name)
File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha512

Same issue, works after removing python@2 brew uninstall python@2.

yes , it worked for me, 3q

@slixurd
Worked for me. Thank you! 😀

brew reinstall [email protected]
Error: An exception occurred within a child process:
FormulaUnavailableError: No available formula with the name "/usr/local/Cellar/python@2/2.7.15_1/.brew/[email protected]"

brew reinstall [email protected]
Error: An exception occurred within a child process:
FormulaUnavailableError: No available formula with the name "/usr/local/Cellar/python@2/2.7.15_1/.brew/[email protected]"

Are you sure [email protected] is in your current directory?

Maybe try reinstalling directly from the URL.

brew reinstall https://raw.githubusercontent.com/Homebrew/homebrew-core/94d572a132a63651739fef1931f540404b7eaa31/Formula/[email protected]

brew reinstall [email protected]
Error: An exception occurred within a child process:
FormulaUnavailableError: No available formula with the name "/usr/local/Cellar/python@2/2.7.15_1/.brew/[email protected]"

Are you sure [email protected] is in your current directory?

Maybe try reinstalling directly from the URL.

brew reinstall https://raw.githubusercontent.com/Homebrew/homebrew-core/94d572a132a63651739fef1931f540404b7eaa31/Formula/[email protected]

Worked. Thank you very much!

brew reinstall [email protected]
Error: An exception occurred within a child process:
FormulaUnavailableError: No available formula with the name "/usr/local/Cellar/python@2/2.7.15_1/.brew/[email protected]"

Are you sure [email protected] is in your current directory?

Maybe try reinstalling directly from the URL.

brew reinstall https://raw.githubusercontent.com/Homebrew/homebrew-core/94d572a132a63651739fef1931f540404b7eaa31/Formula/[email protected]

This was a huge problem for me and it worked! Thank you.

brew reinstall [email protected]
Error: An exception occurred within a child process:
FormulaUnavailableError: No available formula with the name "/usr/local/Cellar/python@2/2.7.15_1/.brew/[email protected]"

Are you sure [email protected] is in your current directory?

Maybe try reinstalling directly from the URL.

brew reinstall https://raw.githubusercontent.com/Homebrew/homebrew-core/94d572a132a63651739fef1931f540404b7eaa31/Formula/[email protected]

Worked like a charm! Thank you so much!

brew reinstall [email protected]
Error: An exception occurred within a child process:
FormulaUnavailableError: No available formula with the name "/usr/local/Cellar/python@2/2.7.15_1/.brew/[email protected]"

Are you sure [email protected] is in your current directory?

Maybe try reinstalling directly from the URL.

brew reinstall https://raw.githubusercontent.com/Homebrew/homebrew-core/94d572a132a63651739fef1931f540404b7eaa31/Formula/[email protected]

Worked for me:
brew reinstall https://raw.githubusercontent.com/Homebrew/homebrew-core/94d572a132a63651739fef1931f540404b7eaa31/Formula/[email protected]

Thanks!

brew reinstall [email protected]
Error: An exception occurred within a child process:
FormulaUnavailableError: No available formula with the name "/usr/local/Cellar/python@2/2.7.15_1/.brew/[email protected]"

Are you sure [email protected] is in your current directory?

Maybe try reinstalling directly from the URL.

brew reinstall https://raw.githubusercontent.com/Homebrew/homebrew-core/94d572a132a63651739fef1931f540404b7eaa31/Formula/[email protected]

such a good job!
Thanks!

brew reinstall [email protected]
Error: An exception occurred within a child process:
FormulaUnavailableError: No available formula with the name "/usr/local/Cellar/python@2/2.7.15_1/.brew/[email protected]"

Are you sure [email protected] is in your current directory?
Maybe try reinstalling directly from the URL.

brew reinstall https://raw.githubusercontent.com/Homebrew/homebrew-core/94d572a132a63651739fef1931f540404b7eaa31/Formula/[email protected]

such a good job!
Thanks!

The PR was merged. https://github.com/Homebrew/homebrew-core/pull/49796
brew upgrade python@2 works.

Workaround for error installing openvFor Mac -
$ Python macbookpro$ pip install opencv-python
ERROR:root:code for hash md5 was not found.

Try these steps:

$brew switch openssl 1.0.2r

then activate your environment and try $ python -c "import hashlib;m=hashlib.md5();print(m.hexdigest())"

Then pip install opencv-python

Reinstall and upgrade failed for me

✦ ❯ brew reinstall https://raw.githubusercontent.com/Homebrew/homebrew-core/94d572a132a63651739fef1931f540404b7eaa31/Formula/[email protected]
Error: Calling Installation of python@2 from a GitHub commit URL is disabled! Use 'brew extract python@2' to stable tap on GitHub instead.

✦ ❯ brew upgrade python@2
Warning: python@2 2.7.17_1 already installed
~

Only this which has worked for me on Catalina is this

$ brew tap-new <user>/homebrew-python2
$ brew extract python@2 <user>/homebrew-python2
$ brew install /usr/local/Homebrew/Library/Taps/<user>/homebrew-python2/Formula/[email protected]

Same here:

Error: An exception occurred within a child process:
FormulaUnavailableError: No available formula with the name "/usr/local/opt/python@2/.brew/[email protected]"

save the file as [email protected] in your OSX

https://raw.githubusercontent.com/Homebrew/homebrew-core/94d572a132a63651739fef1931f540404b7eaa31/Formula/python%402.rb

then

brew reinstall [email protected]

It works for me to resolve the error "ERROR:root:code for hash md5 was not found.".
Just a little confuse to brew version control.

Thanks! Worked for me. I was using virtual environments. So had to link python and pip back to /usr/local/bin/python and /usr/local/bin/pip.

$ ln -sf /usr/local/bin/python  ~/python_envs/env27/bin/python
$ ln -sf /usr/local/bin/pip  ~/python_envs/env27/bin/pip
Was this page helpful?
0 / 5 - 0 ratings