Re: [SOLVED] Module exists and cannot be found
On 9/8/20 10:35 PM, James Moe wrote: > Module PyQt5 is most definitely installed. Apparently there is more to getting > modules loaded than there used to be. > Cause: Operator Error The python installation had become rather messy resulting in the errors I showed. After installing python correctly, the errors disappeared and the app is performing as expected. Thank you all for your replies. -- James Moe jmm-list at sohnen-moe dot com Think. -- https://mail.python.org/mailman/listinfo/python-list
Re: Module exists and cannot be found
Op 09-09-2020 om 07:35 schreef James Moe via Python-list: python 3.6.10 opensuse tumbleweed Tumbleweed is a rolling distro, so that is extremely old for Tumbleweed. I would expect Python 3.8.4 or 3.8.5 to be current there. If you want to use another version, you would have to run in a virtual environment. Did you do that? linux 5.8.4 Module PyQt5 is most definitely installed. How did you check? You want to be in the same virtual environment the program runs in. From my installation (openSuse Leap, so there I run Python 3.6): Python 3.6.10 (default, Jan 16 2020, 09:12:04) [GCC] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import PyQt5 Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'PyQt5' >>> No PyQt5 as I do not have a Qt program in the environment :=) Vriendelijke groet/Kind regards, Menno Hölscher -- https://mail.python.org/mailman/listinfo/python-list
Re: Module exists and cannot be found
> On 9 Sep 2020, at 06:35, James Moe via Python-list > wrote: > > python 3.6.10 > opensuse tumbleweed > linux 5.8.4 > > An old program based on Python (BackInTime) has recently been having > difficulties functioning. See below. > > Module PyQt5 is most definitely installed. Apparently there is more to getting > modules loaded than there used to be. How did you check you have PyQt5 is installed like this? $ python3.6 >>> import PyQt5 If that works then. How do you run the app? > > (Also, I am not familiar with Python.) > > [ error message (verbose option) ] > Traceback (most recent call last): > File "/home/jmoe/diy/backintime-master/qt/app.py", line 35, in >import qttools > File "", line 971, in _find_and_load > File "", line 955, in _find_and_load_unlocked > File "", line 665, in _load_unlocked > File "", line 678, in exec_module > File "", line 219, in _call_with_frames_removed > File "/home/jmoe/diy/backintime-master/qt/qttools.py", line 21, in >from PyQt5.QtGui import (QFont, QColor, QKeySequence) > File "", line 971, in _find_and_load > File "", line 941, in _find_and_load_unlocked > File "", line 219, in _call_with_frames_removed > File "", line 971, in _find_and_load > File "", line 953, in _find_and_load_unlocked > ModuleNotFoundError: No module named 'PyQt5' > [ end ] I forget what does seeing frozen importlib imply? A free stand app with embedded python maybe? > > [ the 1st code lines causing the above ] > qttools.py: > import os > import sys > import gettext > from PyQt5.QtGui import (QFont, QColor, QKeySequence) <<<-- line 21 > ... > > app.py: > import os > import sys > > if not os.getenv('DISPLAY', ''): >os.putenv('DISPLAY', ':0.0') > > import datetime > import gettext > import re > import subprocess > import shutil > import signal > from contextlib import contextmanager > from tempfile import TemporaryDirectory > > import qttools<<<--- line 35 > qttools.registerBackintimePath('common') > ... > [ end ] > > -- > James Moe > jmm-list at sohnen-moe dot com > Think. > -- > https://mail.python.org/mailman/listinfo/python-list > -- https://mail.python.org/mailman/listinfo/python-list
Module exists and cannot be found
python 3.6.10 opensuse tumbleweed linux 5.8.4 An old program based on Python (BackInTime) has recently been having difficulties functioning. See below. Module PyQt5 is most definitely installed. Apparently there is more to getting modules loaded than there used to be. (Also, I am not familiar with Python.) [ error message (verbose option) ] Traceback (most recent call last): File "/home/jmoe/diy/backintime-master/qt/app.py", line 35, in import qttools File "", line 971, in _find_and_load File "", line 955, in _find_and_load_unlocked File "", line 665, in _load_unlocked File "", line 678, in exec_module File "", line 219, in _call_with_frames_removed File "/home/jmoe/diy/backintime-master/qt/qttools.py", line 21, in from PyQt5.QtGui import (QFont, QColor, QKeySequence) File "", line 971, in _find_and_load File "", line 941, in _find_and_load_unlocked File "", line 219, in _call_with_frames_removed File "", line 971, in _find_and_load File "", line 953, in _find_and_load_unlocked ModuleNotFoundError: No module named 'PyQt5' [ end ] [ the 1st code lines causing the above ] qttools.py: import os import sys import gettext from PyQt5.QtGui import (QFont, QColor, QKeySequence) <<<-- line 21 ... app.py: import os import sys if not os.getenv('DISPLAY', ''): os.putenv('DISPLAY', ':0.0') import datetime import gettext import re import subprocess import shutil import signal from contextlib import contextmanager from tempfile import TemporaryDirectory import qttools<<<--- line 35 qttools.registerBackintimePath('common') ... [ end ] -- James Moe jmm-list at sohnen-moe dot com Think. -- https://mail.python.org/mailman/listinfo/python-list