intel-power-control icon indicating copy to clipboard operation
intel-power-control copied to clipboard

No module named 'sip'

Open ayoubelmhamdi opened this issue 1 year ago • 1 comments

Traceback (most recent call last):
  File "/bin/intel-power-control", line 7, in <module>
    import sip
ModuleNotFoundError: No module named 'sip'

ayoubelmhamdi avatar Nov 03 '22 19:11 ayoubelmhamdi

I have added PyQt5-sip to the dependencies, can you try again?

jmechnich avatar Nov 03 '22 21:11 jmechnich

there is another problem, python can't find it,

perhaps, we should import snip from PyQt5

FIX

--- a/intel-power-control
+++ b/intel-power-control
@@ -4,7 +4,7 @@
 import argparse
 import os
 import re
-import sip
+from PyQt5 import sip
 import subprocess
 import sys

ayoubelmhamdi avatar Nov 04 '22 18:11 ayoubelmhamdi

@jmechnich there is another problem, python can't find it,

perhaps, we should import snip from PyQt5

FIX

--- a/intel-power-control
+++ b/intel-power-control
@@ -4,7 +4,7 @@
 import argparse
 import os
 import re
-import sip
+from PyQt5 import sip
 import subprocess
 import sys

ayoubelmhamdi avatar Nov 04 '22 18:11 ayoubelmhamdi

Thanks for your suggestion and sorry for not looking into the problem properly.

The actual solution was to remove the dependency on sip altogether as the program was crashing at the call to sip.delete. Using sip was sort of a hack I had to use when I wrote the code back in the day using Qt4 IIRC. Using a Qt-internal function seems to work now just as well.

Please let me know if the most recent version is working now (or just close this issue).

jmechnich avatar Nov 06 '22 17:11 jmechnich