Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

1.4K
Vistas
Instale mysqlclient para Django Python en Mac OS X Sierra

ya he instalado

  • Pitón 2.7.13
  • Django 1.11
  • MySQL 5.7.17

Quiero usar MySQL con Django, pero después de instalar el conector mysql intenté instalar mysqlclient para Python en $ pip install mysqlclient , pero tengo este problema:

 Collecting mysqlclient Using cached mysqlclient-1.3.10.tar.gz Complete output from command python setup.py egg_info: Traceback (most recent call last): File "<string>", line 1, in <module> File "/private/var/folders/y_/c31n_1v12v169zfv829p_v_80000gn/T/pip-build-f51KhW/mysqlclient/setup.py", line 17, in <module> metadata, options = get_config() File "setup_posix.py", line 54, in get_config libraries = [dequote(i[2:]) for i in libs if i.startswith('-l')] File "setup_posix.py", line 12, in dequote if s[0] in "\"'" and s[0] == s[-1]: IndexError: string index out of range ---------------------------------------- Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/y_/c31n_1v12v169zfv829p_v_80000gn/T/pip-build-f51KhW/mysqlclient/
over 4 years ago · Santiago Trujillo
3 Respuestas
Responde la pregunta

0

Necesitaba lo siguiente para compilar/instalar mysqlclient

 brew install mysql-client # mysql-client is not on the `PATH` by default export PATH="/usr/local/opt/mysql-client/bin:$PATH" # openssl is not on the link path by default export LIBRARY_PATH="$LIBRARY_PATH:/usr/local/opt/openssl/lib/"

Entonces podría pip wheel mysqlclient / pip install mysqlclient con éxito

over 4 years ago · Santiago Trujillo Denunciar

0

También me he encontrado con este problema, a continuación se muestra mi paso:

1. brew install mysql-connector-c

2. pip install mysqlclient

y luego encontré este error, rastreé el código fuente, pero resolví este y luego ocurrió el otro error.

así que cambié la forma de instalar mysqlclient, solo:

1. brew install mysql

2. pip install mysqlclient

esto funcionó para mí, no ocurrió ningún error.

over 4 years ago · Santiago Trujillo Denunciar

0

Instale mysql-client en lugar de mysql si no planea tener mysql en su computadora

brew install mysql-client

echo 'export PATH="/usr/local/opt/mysql-client/bin:$PATH"' >> ~/.bash_profile

source ~/.bash_profile

pip install mysqlclient

exportar LDFLAGS="-L/usr/local/opt/openssl/lib"

exportar CPPFLAGS="-I/usr/local/opt/openssl/include"

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda