0

I am part of a Gitlab python3 project where we are trying to install continuous integration thanks to the file .gitlab-ci.yml.

I am trying to install python3 and all the modules that we need, in order to execute a python test script.

I don't exactly know why but we can't use sudo, nor apt-get.

I succeeded in installing python3 thanks to apk with the following command:

- apk add python3 python3-dev

After that, I upgrade pip3 thanks to the following command:

- pip3 install --upgrade pip

I first need to install sqlalchemy, this is working well:

- pip3 install sqlalchemy
    Collecting sqlalchemy
    Downloading SQLAlchemy-1.2.5.tar.gz (5.6MB)
    Installing collected packages: sqlalchemy
    Running setup.py install for sqlalchemy: started
    Running setup.py install for sqlalchemy: finished with status 'done'
    Successfully installed sqlalchemy-1.2.5

Next, I am trying to install the module PyQt5, but it seems impossible, this command does not work:

- pip3 install PyQt5
    Collecting PyQt5
    Could not find a version that satisfies the requirement PyQt5 (from versions: )
    No matching distribution found for PyQt5

What is strange is that PyQt5 appears when I execute the following command:

- pip3 search pyqt5
    AnyQt (0.0.8)                     - PyQt4/PyQt5 compatibility   layer.
    tws-async (0.5.7)                 - Use the Interactive Brokers API (IBAPI) asynchonouslywith asyncio or PyQt5
    quartz-browser (2.1.0)            - Fast Lightweight web browser written in PyQt5
    pyqt5-macos-built (5.5.0)         - This package installs a prebuilt version of PyQt5 for Mac OS
    cheesemaker (0.3.8)               - A minimalistic image viewer using Python3 and PyQt5
    fgmk (0.7.3)                      - A PyQt5 Maker to generate a RPG Javascript game.
    pytc-gui (1.2.2)                  - PyQt5 GUI for pytc API
    hackedit (1.0a2)                  - The hackable IDE, built with Python3, PyQt5 and pyQode
    python-pyqt5-hexview (0.4.3)      - PyQt5 hex viewer widget.
    pyqt5-installer (5.7.0)           - This package installs an script to install PyQt5
    logReader (0.7.6)                 - PyQt5 programm for parse and reading any log file.
    Sonance-Music-Player (0.1.Alpha)  - This is a music player using PyQt5
    pyblish-qml (1.7.1)               - Frontend for Pyblish written in PyQt5/QML
    pynoder (1.0.3)                   - A Python and PyQt5 package for creating a node-based editor.
    pyqode.qt (2.10.0)                - Shim library that wraps PyQt5, PyQt4 and PySide
    python-pyqt5-vstructui (0.4.0)    - PyQt5 vstruct hex viewer widget.
    PyQt5 (5.10.1)                    - Python bindings for the Qt cross platform UI and application toolkit
    pyqt5-tools (5.9.0.1.2)           - Tools to supplement the official PyQt5 wheels
    PyQt5Designer (5.10.1)            - Python bindings for the Qt cross platform UI designer,must set windows PATH Environment like this:     PATH=D:\soft\Python35\Scripts\;D:\soft\Python35\;D:\soft\Python35\Lib\site-packages\PyQt5;....
    pyqt5reactor (0.0.1)              - 
    PyQt5Singleton (0.1)              - A simple singleton implementation to work with PyQt5
    pyqtspinner (0.1.1)               - A waiting spinner for PyQt5
    PyQtX (0.1.2)                     - Mimics the structure of PyQt5 but provides PyQt4 as a fallback solution.
    pyssb (0.1.1)                     - PyQT5 Site Specific Browser
    python-qt5 (0.3.0)                - PyQt5
    python-qdatamatrix (0.1.18)       - A PyQt4/PyQt5 widget for viewing and editing a DataMatrix object
    qroundprogressbar (1.0.0)         - PyQt5 port of C++ circular progress bar widget library
    Qt.py (1.1.0)                     - Python 2 & 3 compatibility wrapper around all Qt bindings - PySide, PySide2, PyQt4 and PyQt5.
    qt_backport (0.1.3)               - Makes PySide/PyQt4 code work with Qt5 (using PyQt5)
    QtPy (1.4.0)                      - Provides an abstraction layer on top of the various Qt bindings (PyQt5, PyQt4 and PySide) and additional custom QWidgets.
    QtStuff (0.4)                     - Compatibility layer and helper classes for PySide/PyQt4/PyQt5
    qutebrowser (1.2.1)               - A keyboard-driven, vim-like browser based on PyQt5.
    qutepart (3.1.1)                  - Code editor component for PyQt5
    SiQt (0.2.0a1)                    - A compatibility library for PyQt4, PyQt5 and PySide
    specguiutils (0.7)                - Library to provide PyQt5 widgets to display spec file information read using spec2nexus.spec file library
    TURP1210 (1.1.1)                  - A PyQt5 GUI framework for heavy vehicle diagnostic adapters using RP1210
    tv_viewer (1.1.3)                 - Python PyQt5 GUI to view tv program details using tvmaze API and SQLite
    vext.pyqt5 (0.5.21)               - Use system pyqt5 from a virtualenv
    world2d (0.2.0)                   - A widget for PyQt5 implementing a 2d world space to draw in.
    xcirculardichro (0.8rc5)          - Library to provide PyQt5 widgets to display spec file information read using spec2nexus.spec file library
    yxspkg_songzgif (1.3.2)           - A GUI to make gif based on pyqt5

I don't understand how the module can appear with search, but not be installed.

I looked for answers online, and saw that the module SIP must be installed before PyQt5.

With that information, I tried to install SIP but the same thing is happening (visible on search but the module is not found with install).

I also saw that we can install the PyQt5 only with Python 3.5.

With that, I got informations about the version of python installed:

python3 --version
    Python 3.6.3-r9
pip3 --version
    pip 9.0.3 from /usr/lib/python3.6/site-packages (python 3.6)

I tried but I didn't succeed in installing precisely python 3.5.

I also tried that, but it's also not working:

docker pull pypi/pyqt5
    Using default tag: latest
    latest: Pulling from pypi/pyqt5
    674ded4e0a75: Pulling fs layer
    a3ed95caeb02: Pulling fs layer
    3fe37ed373c9: Pulling fs layer
    ddf1745d8563: Pulling fs layer
    b9ef83e0e547: Pulling fs layer
    411d39b1247d: Pulling fs layer
    5b767d10beb4: Pulling fs layer
    25f5fdcb3950: Pulling fs layer
    a0ced0754594: Pulling fs layer
    ddf1745d8563: Waiting
    411d39b1247d: Waiting
    b9ef83e0e547: Waiting
    25f5fdcb3950: Waiting
    a0ced0754594: Waiting
    5b767d10beb4: Waiting
    a3ed95caeb02: Download complete
    ddf1745d8563: Verifying Checksum
    ddf1745d8563: Download complete
    3fe37ed373c9: Verifying Checksum
    3fe37ed373c9: Download complete
    411d39b1247d: Verifying Checksum
    411d39b1247d: Download complete
    5b767d10beb4: Verifying Checksum
    5b767d10beb4: Download complete
    b9ef83e0e547: Verifying Checksum
    b9ef83e0e547: Download complete
    25f5fdcb3950: Verifying Checksum
    25f5fdcb3950: Download complete
    a0ced0754594: Download complete
    674ded4e0a75: Verifying Checksum
    674ded4e0a75: Download complete
    674ded4e0a75: Pull complete
    a3ed95caeb02: Pull complete
    3fe37ed373c9: Pull complete
    ddf1745d8563: Pull complete
    b9ef83e0e547: Pull complete
    411d39b1247d: Pull complete
    5b767d10beb4: Pull complete
    25f5fdcb3950: Pull complete
    a0ced0754594: Pull complete
    Digest:     sha256:a213167f5f228b6f14e97e93af35f60a0864842846b4da4eb0ef85df5f381ad6
    Status: Downloaded newer image for pypi/pyqt5:latest

My error at the end when importing PyQt5:

python3 -u tests.py
    Traceback (most recent call last):
    File "tests.py", line 3, in <module>
        import ProjectManager.Controller as controller
    File       "/builds/irmdataprocess/MIA2/src/modules/ProjectManager/Controller.py", line 4, in <module>
        import Utils.Utils as utils
    File "/builds/irmdataprocess/MIA2/src/modules/Utils/Utils.py", line 2, in <module>
        from PyQt5.QtWidgets import QMessageBox
    ModuleNotFoundError: No module named 'PyQt5'

Best regards and thanks for your help :)

12
  • install from wheel file from pypi Commented Mar 22, 2018 at 18:55
  • I download it with -wget from here? pypi.python.org/pypi/PyQt5/5.6 Commented Mar 22, 2018 at 19:34
  • After that i do pip3 install <filename>.whl? Commented Mar 22, 2018 at 19:34
  • yes. pip3 install <Give .whl filename> Commented Mar 22, 2018 at 19:42
  • Ok i will try tomorrow :) thank you! Commented Mar 22, 2018 at 19:44

1 Answer 1

1

For now, my solution is to install pyqt5 with apk:

apk add py3-qt5
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.