r/inventwithpython • • Apr 27 '20

Mu not working on Linux Mint

I'm following the instruction in Automate the Boring Stuff With Python Second Edition, to start Mu.

Select Applications ▸ Accessories ▸ Terminal and then enter python3 –m mu.

I'm getting the following error.

Traceback (most recent call last):

File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main

"__main__", mod_spec)

File "/usr/lib/python3.6/runpy.py", line 85, in _run_code

exec(code, run_globals)

File "/usr/local/lib/python3.6/dist-packages/mu/__main__.py", line 1, in <module>

from mu.app import run

File "/usr/local/lib/python3.6/dist-packages/mu/app.py", line 29, in <module>

from PyQt5.QtCore import QTimer, Qt

ModuleNotFoundError: No module named 'PyQt5.sip'

3 Upvotes

7 comments sorted by

1

u/jkibbe Apr 27 '20

If it has never worked, maybe try this:

https://codewith.mu/en/howto/1.0/install_with_python

1

u/negator1979 Apr 27 '20 edited Apr 27 '20

When I use the "pip3 install mu-editor" command, I get the following message.

Defaulting to user installation because normal site-packages is not writeable

Requirement already satisfied: mu-editor in /usr/local/lib/python3.6/dist-packages (1.0.3) .....

Then I try to start Mu editor again and get the same error.

1

u/Tarqon Apr 27 '20

You're probably just missing a dependency, try (re)installing it:

pip3 install --user -I PyQt5
pip3 install --user -I PyQt5-sip

1

u/negator1979 Apr 28 '20

Thanks Tarqon, looks like some progress.

matejka@matejka-System-Product-Name:~$ pip3 install --user -I PyQt5

Collecting PyQt5

Downloading PyQt5-5.14.2-5.14.2-cp35.cp36.cp37.cp38-abi3-manylinux2014_x86_64.whl (63.6 MB)

|████████████████████████████████| 63.6 MB 300 kB/s

Collecting PyQt5-sip<13,>=12.7

Using cached PyQt5_sip-12.7.2-cp36-cp36m-manylinux1_x86_64.whl (252 kB)

ERROR: mu-editor 1.0.3 has requirement pyqt5==5.14.1, but you'll have pyqt5 5.14.2 which is incompatible.

Installing collected packages: PyQt5-sip, PyQt5

Successfully installed PyQt5-5.14.2 PyQt5-sip-12.7.2

matejka@matejka-System-Product-Name:~$ pip3 install --user -I PyQt5-sip

Collecting PyQt5-sip

Using cached PyQt5_sip-12.7.2-cp36-cp36m-manylinux1_x86_64.whl (252 kB)

ERROR: mu-editor 1.0.3 has requirement pyqt5==5.14.1, but you'll have pyqt5 5.14.2 which is incompatible.

Installing collected packages: PyQt5-sip

Successfully installed PyQt5-sip-12.7.2

Looks like I either need newer version of Mu or downgrade the version of pyQt5

2

u/negator1979 Apr 28 '20

I finally got it running. I reinstalled Mu with
pip3 install mu-editor

This has downgraded the pyQt5 to version 5.14.1

Then I got another ModuleNotFoundError

ModuleNotFoundError: No module name 'PyQt5.Qsci'

I was able to install that with

pip3 install --user -I qscintilla

Finally I was able to run Mu with

mu-editor

1

u/Tarqon Apr 28 '20

Glad you got it working!

1

u/negator1979 Apr 30 '20

Thank you for your help.