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

250
Vistas
Instale PyQt5 5.14.1 en Linux
pip3 install PyQt5 Collecting PyQt5 Using cached https://files.pythonhosted.org/packages/3a/fb/eb51731f2dc7c22d8e1a63ba88fb702727b324c6352183a32f27f73b8116/PyQt5-5.14.1.tar.gz Complete output from command python setup.py egg_info: Traceback (most recent call last): File "<string>", line 1, in <module> File "/usr/lib/python3.6/tokenize.py", line 452, in open buffer = _builtin_open(filename, 'rb') FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pip-build-b2zw891b/PyQt5/setup.py' ---------------------------------------- Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-b2zw891b/PyQt5/

Luego descargué la carpeta zip de https://www.riverbankcomputing.com/software/pyqt/download5 y ejecuté:

 python3 configure.py --qmake /home/oo/Qt/5.14.0/gcc_64/bin/qmake make sudo make install

Exitoso

 >>> import PyQt5 >>> import PyQt5.QtCore Traceback (most recent call last): File "<stdin>", line 1, in <module> ModuleNotFoundError: No module named 'PyQt5.sip' >>>

Así que instalé

 pip3 install PyQt5.sip pip3 install sip

Exitoso

pero sigue recibiendo el mismo error No module named 'PyQt5.sip' para import PyQt5.QtCore

también probé PyQtChart pero aún así el error

 pip3 install PyQtChart Collecting PyQtChart Using cached https://files.pythonhosted.org/packages/83/35/4f6328db9a31e2776cdcd82ef7688994c11e265649f503858f1913444ba9/PyQtChart-5.14.0-5.14.0-cp35.cp36.cp37.cp38-abi3-manylinux1_x86_64.whl Collecting PyQt5>=5.14 (from PyQtChart) Using cached https://files.pythonhosted.org/packages/3a/fb/eb51731f2dc7c22d8e1a63ba88fb702727b324c6352183a32f27f73b8116/PyQt5-5.14.1.tar.gz Complete output from command python setup.py egg_info: Traceback (most recent call last): File "<string>", line 1, in <module> File "/usr/lib/python3.6/tokenize.py", line 452, in open buffer = _builtin_open(filename, 'rb') FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pip-build-gzep4mr7/PyQt5/setup.py' ---------------------------------------- Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-gzep4mr7/PyQt5/

También descargué la carpeta zip de https://www.riverbankcomputing.com/software/pyqtchart/download y ejecuté:

 python3 configure.py --qmake /home/oo/Qt/5.14.0/gcc_64/bin/qmake Error: Unable to import PyQt5.QtCore. Make sure PyQt5 is installed.

Captura de pantalla QT:: ingrese la descripción de la imagen aquí

Mi objetivo final es ejecutar un gráfico de velas usando pyqt5.

 sudo python3 -m pip install pyqt5 pyqtchart [sudo] password for oo: The directory '/home/oo/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. The directory '/home/oo/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. Requirement already satisfied: pyqt5 in /usr/lib/python3/dist-packages Requirement already satisfied: pyqtchart in /usr/local/lib/python3.6/dist-packages Requirement already satisfied: PyQt5-sip<13,>=12.7 in /home/oo/.local/lib/python3.6/site-packages (from pyqtchart)

pero sigue recibiendo el mismo error:

 Python 3.6.9 (default, Nov 7 2019, 10:44:02) [GCC 8.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import PyQt5 >>> import PyQt5.QtCore Traceback (most recent call last): File "<stdin>", line 1, in <module> ModuleNotFoundError: No module named 'PyQt5.sip' >>>
over 4 years ago · Santiago Trujillo
8 Respuestas
Responde la pregunta

0

Parece que hay un error en la última versión de PyQt5 a pypi, así que instalé una versión 5.14:

 sudo apt-get update && \ sudo apt-get autoclean sudo apt-get update && sudo apt-get install \ -y --no-install-recommends \ python3-pip \ python3-setuptools sudo python3 -m pip install pyqt5==5.14 pyqtchart==5.14

Copie el ejemplo de mi respuesta anterior en main.py y luego ejecute:

 python3 main.py

Te recomiendo que busques las carpetas y archivos generados por tus intentos fallidos y los elimines.

Para mi prueba utilicé el siguiente Dockerfile

over 4 years ago · Santiago Trujillo Denunciar

0

Creo que los problemas iniciales de pip install se debieron a que PyQt5 cambió a la etiqueta de plataforma manylinux2014 para la última versión (ver las ruedas en PyPI para 5.14.1 vs 5.14.0 ). Solo las versiones de pip >= 19.3 reconocen esta etiqueta de plataforma ( ref ), por lo que si tiene una versión anterior de pip, intentará instalarla desde la fuente.

Dos opciones fáciles (para evitar la instalación de origen):

  • Actualice pip a la última versión a través pip3 install --upgrade pip
  • Instale la versión anterior, que usaba manylinux1 ( pip3 install pyqt5==5.14.0 )
over 4 years ago · Santiago Trujillo Denunciar

0

También tuve el mismo problema al instalar PyQt5 (al intentar instalar ReText ).

En Ubuntu 18.04 con Python 3.6.9 y Pip 9.0.1 , pude instalar PyQt5 con estos pasos:

 python3 -m venv env source env/bin/activate pip3 install pyqt5 --only-binary pyqt5

Eso fue suficiente para hacer que pip descargara la rueda binaria PyQt5-5.14.0-5.14.0-cp35.cp36.cp37.cp38-abi3-manylinux1_x86_64.whl (que no necesita/usa setup.py ) en lugar de construir desde el tarball de origen.

De acuerdo con https://pypi.org/project/PyQt5/#files , también hay otras ruedas binarias, así que con suerte cubrirán la mayoría de las necesidades de la plataforma.

over 4 years ago · Santiago Trujillo Denunciar

0

A veces es muy difícil instalar PyQt5 en la distribución Debian o Ubuntu Linux. Pude instalarlo para python3 en mi sistema con Debian 10 buster (estable).
Lo instalé con el administrador de paquetes apt.

 sudo apt-get update sudo apt-get install python3-pyqt5
over 4 years ago · Santiago Trujillo Denunciar

0

Para aquellos que no necesitan desesperadamente 5.14, 5.12 puede ser una solución. Esto funcionó para mí:

 sudo python3 -m pip install pyqt5==5.12 pyqtchart==5.12
over 4 years ago · Santiago Trujillo Denunciar

0

Como mostró la Pregunta, está descargando el archivo tar.zip , no la wheel . La instalación de QT con pip solo está permitida con wheel . Elija la versión que tiene el archivo de rueda en la página de inicio de PyPI y coincide con su versión de Python.

over 4 years ago · Santiago Trujillo Denunciar

0

Tengo este problema también. Es porque su pip está en una versión anterior y debe actualizarlo usando los siguientes comandos:

 pip3 install setuptools wheel pip3 install --upgrade pip pip3 install --user pyqt5
over 4 years ago · Santiago Trujillo Denunciar

0

Tuve que construir la versión correcta de sip desde la fuente para construir la versión deseada de PyQt5 desde la fuente y luego también recibí el siguiente error:

 No module named 'PyQt5.sip'

y luego

 python3 -m pip install PyQt5.sip

resolvió el problema

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