missionpinball / mpf-monitor

Graphical utilty which connects to MPF to let you visually control, troubleshoot, and see the status of the machine
http://missionpinball.org
MIT License
11 stars 10 forks source link

ModuleNotFoundError: No module named 'sip' #34

Closed krayon closed 3 years ago

krayon commented 3 years ago

On execution of mpf monitor, the following error is displayed:

Traceback (most recent call last):
  File "/home/pinball/mpf/mpf-venv/bin/mpf", line 33, in <module>
    sys.exit(load_entry_point('mpf', 'console_scripts', 'mpf')())
  File "/home/pinball/mpf/pinball.mpf.git/mpf/commands/__init__.py", line 175, in run_from_command_line
    CommandLineUtility(path).execute()
  File "/home/pinball/mpf/pinball.mpf.git/mpf/commands/__init__.py", line 151, in execute
    *self.parse_args())
  File "/home/pinball/mpf/pinball.mpf-monitor.git/mpfmonitor/commands/monitor.py", line 100, in __init__
    from mpfmonitor.core.mpfmon import run
  File "/home/pinball/mpf/pinball.mpf-monitor.git/mpfmonitor/core/mpfmon.py", line 10, in <module>
    from PyQt5.QtCore import *
ModuleNotFoundError: No module named 'sip'

An MPF Virtual Environment is being used, and the following are installed with pip3:

(mpf-venv) pinball@lister:~$ pip3 list
Package          Version      Location
---------------- ------------ -----------------------------------------
asciimatics      1.11.0
certifi          2020.12.5
chardet          3.0.4
docutils         0.16
ffpyplayer       4.3.1
future           0.18.2
grpcio           1.31.0
grpcio-tools     1.31.0
idna             2.10
Kivy             1.11.1
Kivy-Garden      0.1.4
lxml             4.6.3
mpf              0.54.0.dev78 /home/pinball/mpf/pinball.mpf.git
mpf-mc           0.54.0.dev20 /home/pinball/mpf/pinball.mpf-mc.git
mpf-monitor      0.54.0.dev7  /home/pinball/mpf/pinball.mpf-monitor.git
packaging        20.9
Pillow           8.0.1
pip              21.0.1
pkg-resources    0.0.0
prompt-toolkit   3.0.8
protobuf         3.13.0
psutil           5.7.0
pyfiglet         0.8.post1
Pygments         2.3.1
pyparsing        2.4.7
PyQt5            5.15.4
PyQt5-Qt5        5.15.2
PyQt5-sip        12.9.0
PyQt5-stubs      5.15.2.0
pyserial         3.4
pyserial-asyncio 0.4
requests         2.25.0
ruamel.yaml      0.15.100
setuptools       54.2.0
six              1.15.0
sortedcontainers 2.1.0
terminaltables   3.1.0
toml             0.10.2
typing           3.7.4.3
urllib3          1.26.2
wcwidth          0.2.5
wheel            0.36.2

I also have python3-pyqt5 and python3-sip installed via apt.

System: Devuan v3 (beowulf)

jabdoa2 commented 3 years ago

My pip3 list as reference:

$ pip3 list 
Package                       Version              Location
----------------------------- -------------------- -------------------------
alabaster                     0.7.12
apigpio-mpf                   0.0.3
apt-clone                     0.2.1
apt-xapian-index              0.49
asciimatics                   1.12.0
astroid                       2.4.1
async-generator               1.10
autopep8                      1.5.4
Babel                         2.8.0
beautifulsoup4                4.8.2
binwalk                       2.2.0
blinker                       1.4
bmap-tools                    3.5
certifi                       2019.11.28
chardet                       3.0.4
Click                         7.0
colorama                      0.4.3
command-not-found             0.3
configobj                     5.0.6
cryptography                  2.8
cupshelpers                   1.0
cycler                        0.10.0
Cython                        0.29.21
dbus-python                   1.2.16
decorator                     4.4.2
deepspeech                    0.9.3
defer                         1.0.6
devscripts                    2.20.2ubuntu2
distro                        1.4.0
distro-info                   0.23ubuntu1
docutils                      0.16
dodgy                         0.2.1
entrypoints                   0.3
evdev                         1.3.0
ffpyplayer                    4.3.2
flake8                        3.8.4
flake8-polyfill               1.0.2
functiontrace                 0.3.4
fuse-python                   1.0.0
future                        0.18.2
galternatives                 1.0.6
gbp                           0.9.19
gitdb                         4.0.5
GitPython                     3.1.11
gpg                           1.13.1-unknown
grabserial                    1.9.8
grpcio                        1.34.0
grpcio-tools                  1.34.0
halo                          0.0.31
html5lib                      1.0.1
httplib2                      0.14.0
idna                          2.8
imagesize                     1.2.0
iotop                         0.6
irc                           19.0.1
isort                         4.3.21
jaraco.classes                3.2.1
jaraco.collections            3.2.0
jaraco.functools              3.2.1
jaraco.logging                3.1.0
jaraco.stream                 3.0.2
jaraco.text                   3.5.0
Jinja2                        2.11.2
keyring                       18.0.1
Kivy                          2.0.0
Kivy-Garden                   0.1.4
kiwisolver                    1.0.1
language-selector             0.1
launchpadlib                  1.10.13
lazr.restfulclient            0.14.2
lazr.uri                      1.0.3
lazy-object-proxy             1.4.3
lightdm-gtk-greeter-settings  1.2.2
log-symbols                   0.0.14
lubuntu-update-notifier       0.1
lxml                          4.5.0
m2r                           0.2.1
MarkupSafe                    1.1.1
matplotlib                    3.1.2
mccabe                        0.6.1
meld                          3.20.2
mistune                       0.8.4
more-itertools                8.7.0
mpf                           0.55.0.dev24         /home/jan/src/mpf
mpf-language-server           0.54.0               /home/jan/src/mpf-ls
mpf-mc                        0.55.0.dev1          /home/jan/src/mpf-mc
mpf-monitor                   0.55.0.dev0          /home/jan/src/mpf-monitor
mypy                          0.812
mypy-extensions               0.4.3
netifaces                     0.10.4
nibabel                       2.5.1
numpy                         1.17.4
oauthlib                      3.1.0
olefile                       0.46
packaging                     20.4
PAM                           0.4.2
pep8-naming                   0.10.0
pexpect                       4.6.0
Pillow                        8.0.1
pip                           20.2.4
pocketsphinx                  0.1.15
prompt-toolkit                3.0.8
prospector                    1.3.1
protobuf                      3.14.0
psutil                        5.7.3
PyAudio                       0.2.11
pycairo                       1.16.2
pycodestyle                   2.6.0
pycups                        1.9.73
pydicom                       1.4.1
pydocstyle                    5.1.1
pyfiglet                      0.8.post1
pyflakes                      2.2.0
Pygments                      2.3.1
PyGObject                     3.36.0
PyICU                         2.4.2
PyJWT                         1.7.1
pylint                        2.5.3
pylint-celery                 0.3
pylint-django                 2.1.0
pylint-flask                  0.6
pylint-plugin-utils           0.6
PyOpenGL                      3.1.0
pyparsing                     2.4.6
pypinproc                     3.0
PyQt5                         5.14.1
pyqtgraph                     0.11.0rc0
pyserial                      3.5
pyserial-asyncio              0.5
python-afl                    0.7.3
python-apt                    2.0.0+ubuntu0.20.4.5
python-dateutil               2.7.3
python-debian                 0.1.36ubuntu1
python-jsonrpc-server         0.4.0
python-magic                  0.4.16
python-osc                    1.7.4
pytz                          2020.1
pyusb                         1.1.0
pyxattr                       0.6.1
pyxdg                         0.26
PyYAML                        5.3.1
reportlab                     3.5.34
requests                      2.22.0
requests-unixsocket           0.2.0
requirements-detector         0.7
ruamel.yaml                   0.15.100
scipy                         1.3.3
SecretStorage                 2.3.1
setoptconf                    0.2.0
setproctitle                  1.1.10
setuptools                    50.3.2
simplejson                    3.16.0
sip                           4.19.21
six                           1.14.0
smbus2                        0.4.1
smbus2-asyncio                0.0.5
smmap                         3.0.4
snowballstemmer               2.0.0
sortedcontainers              2.3.0
soupsieve                     1.9.5
sox                           1.4.1
SpeechRecognition             3.8.1
Sphinx                        3.2.1
sphinx-notfound-page          0.5
sphinx-rtd-theme              0.5.0
sphinxcontrib-applehelp       1.0.2
sphinxcontrib-devhelp         1.0.2
sphinxcontrib-htmlhelp        1.0.3
sphinxcontrib-jsmath          1.0.1
sphinxcontrib-qthelp          1.0.3
sphinxcontrib-serializinghtml 1.1.4
spinners                      0.0.24
ssh-import-id                 5.10
systemd-python                234
tempora                       4.0.1
termcolor                     1.1.0
terminaltables                3.1.0
tifffile                      2018.11.28
toml                          0.10.2
typecatcher                   0.3
typed-ast                     1.4.3
typing-extensions             3.10.0.0
ubuntu-advantage-tools        20.3
ubuntu-drivers-common         0.0.0
ufw                           0.36
ujson                         4.0.1
unattended-upgrades           0.1
unidiff                       0.5.5
urllib3                       1.25.8
usb-creator                   0.3.7
uvloop                        0.15.2
vboxapi                       1.0
wadllib                       1.3.3
wcwidth                       0.2.5
webencodings                  0.5.1
webrtcvad                     2.0.10
wheel                         0.34.2
wrapt                         1.12.1
wxPython                      4.0.7
xkit                          0.0.0

And dpkg -l | grep python3

ii  python3                                                     3.8.2-0ubuntu2                             amd64        interactive high-level object-oriented language (default python3 version)
ii  python3-apport                                              2.20.11-0ubuntu27.18                       all          Python 3 library for Apport crash report handling
ii  python3-apt                                                 2.0.0ubuntu0.20.04.5                       amd64        Python 3 interface to libapt-pkg
ii  python3-aptdaemon                                           1.1.1+bzr982-0ubuntu32.3                   all          Python 3 module for the server and client of aptdaemon
ii  python3-aptdaemon.gtk3widgets                               1.1.1+bzr982-0ubuntu32.3                   all          Python 3 GTK+ 3 widgets to run an aptdaemon client
rc  python3-aptdaemon.pkcompat                                  1.1.1+bzr982-0ubuntu14                     all          PackageKit compatibilty for AptDaemon
ii  python3-binwalk                                             2.2.0+dfsg1-1                              all          Python3 library for analyzing binary blobs and executable code
ii  python3-blinker                                             1.4+dfsg1-0.3ubuntu1                       all          fast, simple object-to-object and broadcast signaling library
ii  python3-bs4                                                 4.8.2-1                                    all          error-tolerant HTML parser for Python 3
ii  python3-cairo:amd64                                         1.16.2-2ubuntu2                            amd64        Python3 bindings for the Cairo vector graphics library
ii  python3-certifi                                             2019.11.28-1                               all          root certificates for validating SSL certs and verifying TLS hosts (python3)
ii  python3-cffi-backend                                        1.14.0-1build1                             amd64        Foreign Function Interface for Python 3 calling C code - runtime
ii  python3-chardet                                             3.0.4-4build1                              all          universal character encoding detector for Python3
ii  python3-click                                               7.0-3                                      all          Wrapper around optparse for command line utilities - Python 3.x
ii  python3-colorama                                            0.4.3-1build1                              all          Cross-platform colored terminal text in Python - Python 3.x
ii  python3-commandnotfound                                     20.04.4                                    all          Python 3 bindings for command-not-found.
ii  python3-configobj                                           5.0.6-4                                    all          simple but powerful config file reader and writer for Python 3
ii  python3-cryptography                                        2.8-3ubuntu0.1                             amd64        Python library exposing cryptographic recipes and primitives (Python 3)
ii  python3-cups                                                1.9.73-3build1                             amd64        Python3 bindings for CUPS
ii  python3-cupshelpers                                         1.5.12-0ubuntu1.1                          all          Python utility modules around the CUPS printing system
ii  python3-cycler                                              0.10.0-3                                   all          composable kwarg iterator (Python 3)
ii  python3-dateutil                                            2.7.3-3ubuntu1                             all          powerful extensions to the standard Python 3 datetime module
ii  python3-dbg                                                 3.8.2-0ubuntu2                             amd64        debug build of the Python 3 Interpreter (version 3.8)
ii  python3-dbus                                                1.2.16-1build1                             amd64        simple interprocess messaging system (Python 3 interface)
ii  python3-dbus.mainloop.pyqt5                                 5.14.1+dfsg-3build1                        amd64        D-Bus Qt main loop support for Python 3
ii  python3-debconf                                             1.5.73                                     all          interact with debconf from Python 3
ii  python3-debian                                              0.1.36ubuntu1                              all          Python 3 modules to work with Debian-related data formats
ii  python3-decorator                                           4.4.2-0ubuntu1                             all          simplify usage of Python decorators by programmers
ii  python3-defer                                               1.0.6-2.1                                  all          Small framework for asynchronous programming (Python 3)
ii  python3-dev                                                 3.8.2-0ubuntu2                             amd64        header files and a static library for Python (default)
ii  python3-dicom                                               1.4.1-1                                    all          transitional package for python3-pydicom
ii  python3-distro                                              1.4.0-1                                    all          Linux OS platform information API
ii  python3-distro-info                                         0.23ubuntu1                                all          information about distributions' releases (Python 3 module)
ii  python3-distupgrade                                         1:20.04.33                                 all          manage release upgrades
ii  python3-distutils                                           3.8.10-0ubuntu1~20.04                      all          distutils package for Python 3.x
ii  python3-entrypoints                                         0.3-2ubuntu1                               all          Discover and load entry points from installed packages (Python 3)
ii  python3-evdev                                               1.3.0+dfsg-1build1                         amd64        Python 3 bindings for the Linux input subsystem
ii  python3-fuse                                                2:1.0.0-3build1                            amd64        Python bindings for FUSE (Filesystems in USErspace) (Python 3 package)
ii  python3-gdbm:amd64                                          3.8.10-0ubuntu1~20.04                      amd64        GNU dbm database support for Python 3.x
ii  python3-gi                                                  3.36.0-1                                   amd64        Python 3 bindings for gobject-introspection libraries
ii  python3-gi-cairo                                            3.36.0-1                                   amd64        Python 3 Cairo bindings for the GObject library
ii  python3-gpg                                                 1.13.1-7ubuntu2                            amd64        Python interface to the GPGME GnuPG encryption library (Python 3)
ii  python3-gst-1.0                                             1.16.2-2                                   amd64        GStreamer GObject Introspection overrides for Python (Python 3)
ii  python3-html5lib                                            1.0.1-2                                    all          HTML parser/tokenizer based on the WHATWG HTML5 specification
ii  python3-httplib2                                            0.14.0-1ubuntu1                            all          comprehensive HTTP client library written for Python3
ii  python3-ibus-1.0                                            1.5.22-2ubuntu2.1                          all          Intelligent Input Bus - introspection overrides for Python (Python 3)
ii  python3-icu                                                 2.4.2-0ubuntu3                             amd64        Python 3 extension wrapping the ICU C++ API
ii  python3-idna                                                2.8-1                                      all          Python IDNA2008 (RFC 5891) handling (Python 3)
ii  python3-jwt                                                 1.7.1-2ubuntu2                             all          Python 3 implementation of JSON Web Token
ii  python3-keyring                                             18.0.1-2ubuntu1                            all          store and access your passwords safely - Python 3 version of the package
ii  python3-kiwisolver                                          1.0.1-3build1                              amd64        fast implementation of the Cassowary constraint solver - Python 3.X
ii  python3-launchpadlib                                        1.10.13-1                                  all          Launchpad web services client library (Python 3)
ii  python3-lazr.restfulclient                                  0.14.2-2build1                             all          client for lazr.restful-based web services (Python 3)
ii  python3-lazr.uri                                            1.0.3-4build1                              all          library for parsing, manipulating, and generating URIs
ii  python3-lib2to3                                             3.8.10-0ubuntu1~20.04                      all          Interactive high-level object-oriented language (lib2to3)
ii  python3-lxml:amd64                                          4.5.0-1ubuntu0.3                           amd64        pythonic binding for the libxml2 and libxslt libraries
ii  python3-magic                                               2:0.4.15-3                                 all          python3 interface to the libmagic file type identification library
ii  python3-matplotlib                                          3.1.2-1ubuntu4                             amd64        Python based plotting system in a style similar to Matlab (Python 3)
ii  python3-minimal                                             3.8.2-0ubuntu2                             amd64        minimal subset of the Python language (default python3 version)
ii  python3-netifaces                                           0.10.4-1ubuntu4                            amd64        portable network interface information - Python 3.x
ii  python3-nibabel                                             2.5.1-3                                    all          Python3 bindings to various neuroimaging data formats
ii  python3-numpy                                               1:1.17.4-5ubuntu3                          amd64        Fast array facility to the Python 3 language
ii  python3-oauthlib                                            3.1.0-1ubuntu2                             all          generic, spec-compliant implementation of OAuth for Python3
ii  python3-odil                                                0.11.0-1build1                             amd64        C++11 library for the DICOM standard (Python 3 wrappers)
ii  python3-olefile                                             0.46-2                                     all          Python module to read/write MS OLE2 files
ii  python3-opengl                                              3.1.0+dfsg-2build1                         all          Python bindings to OpenGL (Python 3)
ii  python3-pam                                                 0.4.2-13.2ubuntu8                          amd64        Python interface to the PAM library
ii  python3-pexpect                                             4.6.0-1build1                              all          Python 3 module for automating interactive applications
ii  python3-pil:amd64                                           7.0.0-4ubuntu0.4                           amd64        Python Imaging Library (Python3)
ii  python3-pil.imagetk:amd64                                   7.0.0-4ubuntu0.4                           amd64        Python Imaging Library - ImageTk Module (Python3)
ii  python3-pip                                                 20.0.2-5ubuntu1.5                          all          Python package installer
ii  python3-pkg-resources                                       45.2.0-1                                   all          Package Discovery and Resource Access using pkg_resources
ii  python3-problem-report                                      2.20.11-0ubuntu27.18                       all          Python 3 library to handle problem reports
ii  python3-psutil                                              5.5.1-1ubuntu4                             amd64        module providing convenience functions for managing processes (Python3)
ii  python3-ptyprocess                                          0.6.0-1ubuntu1                             all          Run a subprocess in a pseudo terminal from Python 3
ii  python3-pydicom                                             1.4.1-1                                    all          DICOM medical file reading and writing (Python 3)
ii  python3-pyparsing                                           2.4.6-1                                    all          alternative to creating and executing simple grammars - Python 3.x
ii  python3-pyqt5                                               5.14.1+dfsg-3build1                        amd64        Python 3 bindings for Qt5
ii  python3-pyqt5.qtopengl                                      5.14.1+dfsg-3build1                        amd64        Python 3 bindings for Qt5's OpenGL module
ii  python3-pyqtgraph                                           0.11.0~rc0-1                               all          Scientific Graphics and GUI Library for Python 3
ii  python3-pyxattr                                             0.6.1-2                                    amd64        module for manipulating filesystem extended attributes (Python3)
ii  python3-renderpm:amd64                                      3.5.34-1ubuntu1                            amd64        python low level render interface
ii  python3-reportlab                                           3.5.34-1ubuntu1                            all          ReportLab library to create PDF documents using Python3
ii  python3-reportlab-accel:amd64                               3.5.34-1ubuntu1                            amd64        C coded extension accelerator for the ReportLab Toolkit
ii  python3-requests                                            2.22.0-2ubuntu1                            all          elegant and simple HTTP library for Python3, built for human beings
ii  python3-requests-unixsocket                                 0.2.0-2                                    all          Use requests to talk HTTP via a UNIX domain socket - Python 3.x
ii  python3-scipy                                               1.3.3-3build1                              amd64        scientific tools for Python 3
ii  python3-secretstorage                                       2.3.1-2ubuntu1                             all          Python module for storing secrets - Python 3.x version
ii  python3-serial                                              3.4-5.1                                    all          pyserial - module encapsulating access for the serial port
ii  python3-setproctitle:amd64                                  1.1.10-1ubuntu1                            amd64        Setproctitle implementation for Python 3
ii  python3-setuptools                                          45.2.0-1                                   all          Python3 Distutils Enhancements
ii  python3-simplejson                                          3.16.0-2ubuntu2                            amd64        simple, fast, extensible JSON encoder/decoder for Python 3.x
ii  python3-sip                                                 4.19.21+dfsg-1build1                       amd64        Python 3/C++ bindings generator runtime library
ii  python3-six                                                 1.14.0-2                                   all          Python 2 and 3 compatibility library (Python 3 interface)
ii  python3-software-properties                                 0.98.9.5                                   all          manage the repositories that you install software from
ii  python3-soupsieve                                           1.9.5+dfsg-1                               all          modern CSS selector implementation for BeautifulSoup (Python 3)
ii  python3-systemd                                             234-3build2                                amd64        Python 3 bindings for systemd
ii  python3-talloc:amd64                                        2.3.0-3ubuntu1                             amd64        hierarchical pool based memory allocator - Python3 bindings
ii  python3-tk:amd64                                            3.8.10-0ubuntu1~20.04                      amd64        Tkinter - Writing Tk applications with Python 3.x
ii  python3-unidiff                                             0.5.5-2                                    all          Unified diff Python parsing/metadata extraction library (Python 3)
ii  python3-update-manager                                      1:20.04.10.7                               all          python 3.x module for update-manager
ii  python3-urllib3                                             1.25.8-2ubuntu0.1                          all          HTTP library with thread-safe connection pooling for Python3
ii  python3-wadllib                                             1.3.3-3build1                              all          Python 3 library for navigating WADL files
ii  python3-webencodings                                        0.5.1-1ubuntu1                             all          Python implementation of the WHATWG Encoding standard
ii  python3-wheel                                               0.34.2-1                                   all          built-package format for Python
ii  python3-wxgtk4.0                                            4.0.7+dfsg-2build1                         amd64        Python 3 interface to the wxWidgets Cross-platform C++ GUI toolkit
ii  python3-xapian                                              1.4.14-1ubuntu2                            amd64        Xapian search engine interface for Python3
ii  python3-xdg                                                 0.26-1ubuntu1                              all          Python 3 library to access freedesktop.org standards
ii  python3-xkit                                                0.5.0ubuntu4                               all          library for the manipulation of xorg.conf files (Python 3)
ii  python3-yaml                                                5.3.1-1ubuntu0.1                           amd64        YAML parser and emitter for Python3
ii  python3.7                                                   3.7.10-1+focal3                            amd64        Interactive high-level object-oriented language (version 3.7)
ii  python3.7-dev                                               3.7.10-1+focal3                            amd64        Header files and a static library for Python (v3.7)
ii  python3.7-distutils                                         3.7.10-1+focal3                            all          distutils package for Python (version 3.7)
ii  python3.7-lib2to3                                           3.7.10-1+focal3                            all          lib2to3 package for Python (version 3.7)
ii  python3.7-minimal                                           3.7.10-1+focal3                            amd64        Minimal subset of the Python language (version 3.7)
ii  python3.7-venv                                              3.7.10-1+focal3                            amd64        Interactive high-level object-oriented language (pyvenv binary, version 3.7)
ii  python3.8                                                   3.8.5-1~20.04.3                            amd64        Interactive high-level object-oriented language (version 3.8)
ii  python3.8-dbg                                               3.8.5-1~20.04.3                            amd64        Debug Build of the Python Interpreter (version 3.8)
ii  python3.8-dev                                               3.8.5-1~20.04.3                            amd64        Header files and a static library for Python (v3.8)
ii  python3.8-minimal                                           3.8.5-1~20.04.3                            amd64        Minimal subset of the Python language (version 3.8)
krayon commented 3 years ago

This seems to have fixed it:

sudo apt-get purge --auto-remove python3-sip
[sudo] password for krayon: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  python3-pyqt5* python3-sip*
0 upgraded, 0 newly installed, 2 to remove and 365 not upgraded.
After this operation, 16.4 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 291552 files and directories currently installed.)
Removing python3-pyqt5 (5.11.3+dfsg-1+b3) ...
Removing python3-sip (4.19.14+dfsg-2) ...

For good measure I also used pip to install the versions listed in requirements.txt:

pip3 uninstall PyQt5 PyQt5-stubs PyQt5-sip lxml
pip3 install PyQt5==5.15.0 PyQt5-sip==12.8.0 PyQt5-stubs==5.14.2.2