Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

149
Views
"ERROR: raíz: no se encontró el código para hash md5" al usar cualquier comando hg mercurial

Cuando trato de usar cualquier comando hg Mercurial en la consola, sigo recibiendo este error. Instalé Python usando Homebrew y estoy ejecutando Mac OS Catalina v. 10.15.1.

Cualquier referencia sería apreciada. Aquí está el error que estoy recibiendo:

 hg commit --amend ERROR:root:code for hash md5 was not found. Traceback (most recent call last): File "/usr/local/Cellar/python@2/2.7.15_3/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_3/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_3/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_3/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_3/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_3/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_3/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_3/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_3/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_3/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_3/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_3/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 Traceback (most recent call last): File "/usr/local/bin/hg", line 43, in <module> dispatch.run() File "/usr/local/Cellar/mercurial/4.9/lib/python2.7/site-packages/hgdemandimport/demandimportpy2.py", line 150, in __getattr__ self._load() File "/usr/local/Cellar/mercurial/4.9/lib/python2.7/site-packages/hgdemandimport/demandimportpy2.py", line 94, in _load _origimport, head, globals, locals, None, level) File "/usr/local/Cellar/mercurial/4.9/lib/python2.7/site-packages/hgdemandimport/demandimportpy2.py", line 43, in _hgextimport return importfunc(name, globals, *args, **kwargs) File "/usr/local/Cellar/mercurial/4.9/lib/python2.7/site-packages/mercurial/dispatch.py", line 625, in <module> class lazyaliasentry(object): File "/usr/local/Cellar/mercurial/4.9/lib/python2.7/site-packages/mercurial/dispatch.py", line 636, in lazyaliasentry @util.propertycache File "/usr/local/Cellar/mercurial/4.9/lib/python2.7/site-packages/hgdemandimport/demandimportpy2.py", line 150, in __getattr__ self._load() File "/usr/local/Cellar/mercurial/4.9/lib/python2.7/site-packages/hgdemandimport/demandimportpy2.py", line 94, in _load _origimport, head, globals, locals, None, level) File "/usr/local/Cellar/mercurial/4.9/lib/python2.7/site-packages/hgdemandimport/demandimportpy2.py", line 43, in _hgextimport return importfunc(name, globals, *args, **kwargs) File "/usr/local/Cellar/mercurial/4.9/lib/python2.7/site-packages/mercurial/util.py", line 180, in <module> 'md5': hashlib.md5, File "/usr/local/Cellar/mercurial/4.9/lib/python2.7/site-packages/hgdemandimport/demandimportpy2.py", line 151, in __getattr__ return getattr(self._module, attr) AttributeError: 'module' object has no attribute 'md5'

También intenté seguir las instrucciones sobre este problema, pero ninguna de las soluciones parece funcionar.

 brew link openssl --force Warning: Refusing to link macOS-provided software: openssl@1.1 If you need to have openssl@1.1 first in your PATH run: echo 'export PATH="/usr/local/opt/openssl@1.1/bin:$PATH"' >> ~/.zshrc For compilers to find openssl@1.1 you may need to set: export LDFLAGS="-L/usr/local/opt/openssl@1.1/lib" export CPPFLAGS="-I/usr/local/opt/openssl@1.1/include" For pkg-config to find openssl@1.1 you may need to set: export PKG_CONFIG_PATH="/usr/local/opt/openssl@1.1/lib/pkgconfig"
over 4 years ago · Santiago Trujillo
14 answers
Answer question

0

Mi problema era tener pyenv instalado y apuntar a una versión anterior de python 2

Desinstalar python@2 (python2 fue EOL desde el 1 de enero de 2020)

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

luego

 $ pyenv versions system * 2.7.12 (set by /Users/admin/.python-version) 3.4.5 3.7.7 $ pyenv local system $ pyenv global system
over 4 years ago · Santiago Trujillo Report

0

En macOS Mojave (10.14.6), esto funcionó para mí:

  • Guarde el archivo como python@2.rb en su directorio actual.
  • preparar reinstalar python@2.rb
  • Estaba usando entornos virtuales, así que tuve que volver a vincularlos a /usr/local/bin/python y /usr/local/bin/pip para los binarios de python y pip .
over 4 years ago · Santiago Trujillo Report

0

Después de instalar openssl tuve el mismo problema. Esta respuesta no me ayudó, pero después de vincular manualmente libcrypto.1.1.dylib y libssl.1.1.dylib todo comenzó a funcionar. En mi caso fue:

 ln -s /usr/local/opt/openssl/lib/libcrypto.1.1.dylib /usr/local/lib ln -s /usr/local/opt/openssl/lib/libssl.1.1.dylib /usr/local/lib
over 4 years ago · Santiago Trujillo Report

0

Tuve este problema recientemente (2020, mayo) con la CLI de GCP de Google. También funciona en el obsoleto Python 2.7.

Este es un problema de instalación de Python 2 borrado. mBrew ya no instala correctamente Python 2 con gracia, ya que a nadie le importa el abondonware.

Conda aún instala Python 2 en un entorno; Yo lo hice.

over 4 years ago · Santiago Trujillo Report

0

La siguiente solución me funcionó en MacOS Catalina:

  1. Desvincular openssl
 brew unlink openssl
  1. Vuelva a instalar python 2.7 (eliminado de homebrew y no se puede instalar a través de brew install python@2 )
 brew tap-new <user>/homebrew-python2 brew extract python@2 <user>/homebrew-python2 brew reinstall /usr/local/Homebrew/Library/Taps/<user>/homebrew-python2/Formula/python@2.7.17.rbl
over 4 years ago · Santiago Trujillo Report

0

Mi problema eran varias versiones de python instaladas (python todavía tenía un alias de python2 pero quería que pip usara python3). también tengo un contenedor python3 instalado en mi sistema

 # use pip with python3 $ python3 -m pip install fish

consulte¿Cómo lidiar con varias versiones de Python y PIP? para detalles

over 4 years ago · Santiago Trujillo Report

0

El caso para mí es que cuando instalo dependencias de una aplicación web django, estropea el entorno. Cuando escribo cd , muestra el mismo error.

El problema era la biblioteca de openssl , no puede encontrar las correctas.

Si está en Macintosh, puede escribir

ls /usr/local/Cellar/openssl

para ver todas las versiones,

brew switch openssl 1.0.XXXX

para elegir la versión openssl disponible.

Entonces el error se ha ido :)

over 4 years ago · Santiago Trujillo Report

0

Cuando importaba hashlib, veía un mensaje de error que indicaba que no se encontró hash md5.

Pude solucionar este problema desvinculando primero openssl: brew unlink openssl

Luego desinstalé python 2.7 usando MacPorts: sudo port uninstall python27

Luego instalé python 2.7 usando MacPorts: sudo port install python27

Ahora importar hashlib funciona :)

over 4 years ago · Santiago Trujillo Report

0

Simplemente desinstale python2

$ brew uninstall python@2

Si hay algún error:

$ brew uninstall --ignore-dependencies python@2

over 4 years ago · Santiago Trujillo Report

0

Ejecutar brew reinstall python@2 no funcionó para mis entornos virtuales Python 2.7 existentes. Dentro de ellos todavía había errores ERROR:root:code for hash sha1 was not found .

Encontré este problema después de ejecutar brew upgrade openssl . Y aquí está la solución:

 $ ls /usr/local/Cellar/openssl

...el cual muestra

 1.0.2t

De acuerdo con la versión existente, ejecute:

 $ brew switch openssl 1.0.2t

...el cual muestra

 Cleaning /usr/local/Cellar/openssl/1.0.2t Opt link created for /usr/local/Cellar/openssl/1.0.2t

Después de eso, ejecute el siguiente comando en un virtualenv de Python 2.7:

 (my-venv) $ python -c "import hashlib;m=hashlib.md5();print(m.hexdigest())"

...el cual muestra

 d41d8cd98f00b204e9800998ecf8427e

No más errores.

over 4 years ago · Santiago Trujillo Report

0

Logré arreglar esto desvinculando primero openssl

 brew unlink openssl

Y luego reinstalar python

 brew reinstall python@2

También noté que al ejecutar 'brew doctor' había una advertencia relacionada con una carpeta de openssl que se encuentra en /usr/local/include/node/. Eliminé esta carpeta antes de ejecutar los comandos anteriores (no estoy seguro si está relacionado)

over 4 years ago · Santiago Trujillo Report

0

En mi caso, mi entorno usaba python 2.7.15. Cuando cambié mi versión de pyenv a 2.7.18, simplemente funcionó.

over 4 years ago · Santiago Trujillo Report

0

Para mi caso, solo reinstalo python2 usando pyenv

 pyenv uninstall 2.7.18 pyenv install 2.7.18

entonces todo parece encajar.

over 4 years ago · Santiago Trujillo Report

0

Esto lo arregló para mí, uso port not brew:

sudo port upgrade openssl

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!