Carla icon indicating copy to clipboard operation
Carla copied to clipboard

ModuleNotFoundError: No module named 'PyQt5'

Open xnghu opened this issue 3 years ago • 7 comments

Description of how I can reproduce my bug:

  1. Running Debian Sid. Freshly updated and upgraded as of moments before posting this.
  2. Add the KXStudio repositories via kxstudio-repos.deb via https://kx.studio/Repositories
  3. Update and install Carla with sudo apt-get install carla (Successfull)
  4. Running Carla gives:
$ carla
Traceback (most recent call last):
  File "/usr/share/carla/carla", line 22, in <module>
    from carla_host import *
  File "/usr/share/carla/carla_host.py", line 40, in <module>
    from PyQt5.QtCore import (ModuleNotFoundError: No module named 'PyQt5'`
  1. Attempting to manually install python3-pyqt5 shows it's already installed:
$ sudo apt-get install python3-pyqt5
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
python3-pyqt5 is already the newest version (5.15.6+dfsg-1).

Expected behavior: Carla installs and works without further dependency management when using the package manager and the KX Repos.

Please let me know what other info I might provide to help solve this

xnghu avatar Nov 02 '21 02:11 xnghu

This is a debian problem, not Carla. If you have python3-pyqt5 installed then this simple command should run without errors:

python3 -c "import PyQt5"

falkTX avatar Nov 02 '21 08:11 falkTX

I ran into the same issue on Ubuntu 21.10.

The workaround was to install PyQt5 with pip: pip install PyQt5

edward3h avatar Nov 14 '21 21:11 edward3h

I seriously advise against that. installing pyqt through pip is likely to break many things

falkTX avatar Nov 14 '21 22:11 falkTX

Do you have a better suggestion?

edward3h avatar Nov 15 '21 01:11 edward3h

It is something to see in your own distro. installing python3-pyqt5 should not be hard, and if they broke it they really need to fix it then

falkTX avatar Nov 15 '21 09:11 falkTX

hi, I'm on Debian GNU/Linux 11 (bullseye), with gnome. I had the same problem, which I solved by launching "python3", you can see its default python version, for me "python3.8.9" then installing via pip pyqt5: "python3.8 -m pip install pyqt5"

Schneckensuppe avatar Feb 16 '22 09:02 Schneckensuppe

For a more robust system, installing it via the package manager rather than pip is advised. The package manager knows nothing about what pip does, so when the package manager (and I've no idea how it didn't install it as a dependency previously) eventually tries to install the module, there will either be an error or two copies of the module on the system that could eventually go out of sync with other things and cause a problem.

mxmilkiib avatar Feb 16 '22 11:02 mxmilkiib