Can't package up my PyQt5 application in PyCharm

2.7k views Asked by At

I am trying to use FBSENV to package my software however my code in my main.py gives me:

ModuleNotFoundError: No module named 'fbs_runtime'

my import statement is:

from fbs_runtime.application_context.PyQt5 import ApplicationContext
1

There are 1 answers

0
Vynz On

Try this : from fbs_runtime.application_context import ApplicationContext

Know that fbs only supports Python versions 3.5 and 3.6.

python3 -m venv fbsenv                  // virtual environment creation
call fbsenv\scripts\activate.bat        // run it
pip3 install fbs PyQt5 PyInstaller==3.4 // install required libs

fbs startproject // starting an app
fbs run          // run it

Application context:

if __name__ == '__main__':
    ctx = ApplicationContext()
    w = MyCustomWindow()
    ctx.app.exec_()

Everything's described here