After installation, cannot run: ModuleNotFoundError: No module named 'PyQt5'

I tried on Arch Linux, then on the currently available Ubuntu LTS, then on Windows 10.

In all cases, the installation appears to work flawlessly.

But then when I try to run Osdag for the first time, it doesn't work. When running in Windows, it gives no error message when double-clicking the desktop shortcut.

If I go to the Osdag installation folder (on Windows) and run Osdag.bat, I get this error message - which is essentially the same error as what I get in Linux. In Linux, I tried using conda to install PyQT5. This worked, and the error message changed to some other missing Python module.

Please help me to make Osdag work.

D:\Program Files (x86)\Osdag>Osdag.bat
Traceback (most recent call last):
File "osdagMainPage.py", line 86, in <module>
from PyQt5.QtWidgets import QMessageBox,QApplication, QDialog, QMainWindow
ModuleNotFoundError: No module named 'PyQt5'

Osdag 05-11-23, 1:04 p.m. Johan
I checked another answer on the forum. When I run this: D:\Program Files (x86)\Osdag>python
Python 3.7.6 (default, Jan 8 2020, 20:23:39) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32 Warning:
This Python interpreter is in a conda environment, but the environment has
not been activated. Libraries may fail to load. To activate this environment
please see https://conda.io/activation At https://conda.io/activation I found that I had to run `conda activate`. I did so, now when I run `Python` there is no warning. But Osdag still fails in the same way.
05-11-23, 1:17 p.m. Johan


Dear Osdag user,

Could you please share the screenshot of the error that you see when you try to run Osdag?

What is the specific OS that you are using? Also, check this (https://forums.fossee.in/question/1927/) discussion in the same forum and verify if you have followed all the steps correctly. Alternatively, deleting/uninstalling the previous installation and trying a fresh installation could also work. Please make sure to check for any errors that appear during the installation. If you see any error/warning, kindly share the screenshot as a reply to this post.


Thank you!

06-11-23, 11:58 a.m. Osdag-admin

Dear admin,

I am using Ubuntu 22.04.3 LTS.

I re-tried the installation in a clean VM, and ran into this error while running 2-install-osdag.sh (see below for text version, and attached screenshot).

It is now obvious that my problem is that `gcc` is not installed in my clean VM.  Please add this as an explicit requirement for Osdag?

Anyway, I ran `apt install gcc`, then re-tried 2-install-osdag.sh - and now it works.

It would be ideal if:

 - The documentation (and installation script) explicitly required GCC to be installed

 - The installation script didn't lie to users anymore (it says "All required packages were installed" even if PyQt failed to compile).


Thanks for your response!




  Building wheel for PyQt5-sip (PEP 517) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/johan/miniconda3/bin/python /home/johan/miniconda3/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /tmp/tmpxtessntw
       cwd: /tmp/pip-install-u4z1_68h/PyQt5-sip
  Complete output (8 lines):
  running bdist_wheel
  running build
  running build_ext
  building 'PyQt5.sip' extension
  creating build
  creating build/temp.linux-x86_64-cpython-37
  gcc -pthread -B /home/johan/miniconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/johan/miniconda3/include/python3.7m -c apiversions.c -o build/temp.linux-x86_64-cpython-37/apiversions.o
  error: command 'gcc' failed: No such file or directory: 'gcc'



06-11-23, 1:05 p.m. Johan

Login to add comment

The screenshot I promised.
06-11-23, 1:06 p.m. Johan

Log-in to answer to this question.