Closed thundertrick closed 6 years ago
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, inglobals()[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, inglobals()[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/python@2.rb"
Same here:
Error: An exception occurred within a child process: FormulaUnavailableError: No available formula with the name "/usr/local/opt/python@2/.brew/python@2.rb"
Same here:
Error: An exception occurred within a child process: FormulaUnavailableError: No available formula with the name "/usr/local/opt/python@2/.brew/python@2.rb"
save the file as python@2.rb in your OSX
then
brew reinstall python@2.rb
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 python@2.rb
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/python@2.rb"
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 python@2.rb 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/python@2.rb"
brew reinstall python@2.rb 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/python@2.rb"
Are you sure python@2.rb
is in your current directory?
Maybe try reinstalling directly from the URL.
brew reinstall https://raw.githubusercontent.com/Homebrew/homebrew-core/94d572a132a63651739fef1931f540404b7eaa31/Formula/python@2.rb
brew reinstall python@2.rb 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/python@2.rb"
Are you sure
python@2.rb
is in your current directory?Maybe try reinstalling directly from the URL.
brew reinstall https://raw.githubusercontent.com/Homebrew/homebrew-core/94d572a132a63651739fef1931f540404b7eaa31/Formula/python@2.rb
Worked. Thank you very much!
brew reinstall python@2.rb 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/python@2.rb"
Are you sure
python@2.rb
is in your current directory?Maybe try reinstalling directly from the URL.
brew reinstall https://raw.githubusercontent.com/Homebrew/homebrew-core/94d572a132a63651739fef1931f540404b7eaa31/Formula/python@2.rb
This was a huge problem for me and it worked! Thank you.
brew reinstall python@2.rb 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/python@2.rb"
Are you sure
python@2.rb
is in your current directory?Maybe try reinstalling directly from the URL.
brew reinstall https://raw.githubusercontent.com/Homebrew/homebrew-core/94d572a132a63651739fef1931f540404b7eaa31/Formula/python@2.rb
Worked like a charm! Thank you so much!
brew reinstall python@2.rb 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/python@2.rb"
Are you sure
python@2.rb
is in your current directory?Maybe try reinstalling directly from the URL.
brew reinstall https://raw.githubusercontent.com/Homebrew/homebrew-core/94d572a132a63651739fef1931f540404b7eaa31/Formula/python@2.rb
Worked for me: brew reinstall https://raw.githubusercontent.com/Homebrew/homebrew-core/94d572a132a63651739fef1931f540404b7eaa31/Formula/python@2.rb
Thanks!
brew reinstall python@2.rb 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/python@2.rb"
Are you sure
python@2.rb
is in your current directory?Maybe try reinstalling directly from the URL.
brew reinstall https://raw.githubusercontent.com/Homebrew/homebrew-core/94d572a132a63651739fef1931f540404b7eaa31/Formula/python@2.rb
such a good job! Thanks!
brew reinstall python@2.rb 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/python@2.rb"
Are you sure
python@2.rb
is in your current directory? Maybe try reinstalling directly from the URL.brew reinstall https://raw.githubusercontent.com/Homebrew/homebrew-core/94d572a132a63651739fef1931f540404b7eaa31/Formula/python@2.rb
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/python@2.rb
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/python@2.7.17.rb
Same here:
Error: An exception occurred within a child process: FormulaUnavailableError: No available formula with the name "/usr/local/opt/python@2/.brew/python@2.rb"
save the file as python@2.rb in your OSX
then
brew reinstall python@2.rb
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
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
andwatchman
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: