0

I just followed the following thread (How do I completely uninstall Node.js, and reinstall from beginning (Mac OS X)) to uninstall node and npm from my System (Mac OSX Catalina). When I restarted my terminal I got the following error on startup (before typing any commands):

Last login: Tue Jan 21 16:59:52 on ttys002
Traceback (most recent call last):
  File "/usr/local/Cellar/python@2/2.7.15_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 147, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/usr/local/Cellar/python@2/2.7.15_2/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_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 147, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/usr/local/Cellar/python@2/2.7.15_2/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_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 147, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/usr/local/Cellar/python@2/2.7.15_2/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_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 147, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/usr/local/Cellar/python@2/2.7.15_2/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_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 147, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/usr/local/Cellar/python@2/2.7.15_2/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_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 147, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/usr/local/Cellar/python@2/2.7.15_2/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

I don't understand why uninstalling node and npm from my system induces errors in the python install. Do you have any idea how to fix this? Thanks in advance!

Ecuashungo
  • 78
  • 12
  • Some searching here on that error, which I strongly encourage you to do in the future, suggests you deleted more than you should have. I found [Error importing hashlib with python 2.7 but not with 2.6](https://stackoverflow.com/questions/20399331/error-importing-hashlib-with-python-2-7-but-not-with-2-6) are most probable reason. – Mike 'Pomax' Kamermans Jan 21 '20 at 16:30
  • Even after restoring the deleted files (I had moved them to the trashbin) the error remains. I think the ssl library was in `/usr/local/include/node/openssl/`. Is it possible that links are missing now? – Ecuashungo Jan 21 '20 at 16:52
  • entirely so. If you run regular backups, you probably want to restore from you rmost recent one, because it'll be way easier to do that and then uninstall Node a little less aggressively, than it'll be to restore the ancient MacOS python 2.7 to fully working order. – Mike 'Pomax' Kamermans Jan 21 '20 at 16:56
  • I do have regular backups. In order for that to work, do I need to only restore all the deleted folders or also the python2.7 install? – Ecuashungo Jan 21 '20 at 17:02
  • you'll need to do a full rollback to before you started removing node, because you changed things in the base macos install. – Mike 'Pomax' Kamermans Jan 21 '20 at 17:07
  • I have just completed a full rollback of the system through TimeMachine and was surprized that the error was still there. How is this even possible? – Ecuashungo Jan 25 '20 at 09:37
  • That is a _very_ good question... – Mike 'Pomax' Kamermans Jan 25 '20 at 10:54

0 Answers0