0

I have a GUI application made using PySide2 and it some major modules it uses are OpenVino(2019), dlib, OpenCV-contrib(4.2.x) and Postgres(psycopg2) and I am trying to freeze the application using PyInstaller (--debug is True).

The program gets frozen without errors but during execution, I get the following error:

Fatal Python error: initfsencoding: unable to load the file system codec
ModuleNotFoundError: No module named 'encodings'

after which the application exits.

I have tried many suggestions provided in other stackoverflow questions/github issues but none of them have worked.

I have python version 3.7.6 but I have also tried with 3.6.8 (both local installation and after creating new venv in pycharm). I have tried different versions of pycharm as well(it shows som other errors below 3.5). I have tried pycharm 3.6 both develop branch and master branch.

I have checked my PYTHONPATH and PYTHONHOME in env variables, they are pointing to python's location.

I have modified my specfile to include the necessary binaries, files, imports and folders. I would share it if needed. Also any other logs during build or execution.

I would like to know what I should do to solve this, wheather this issue is because of some component or is this a PyInstaller issue, and if so, should I raise it on github.

My os is windows 10.

SajanGohil
  • 960
  • 13
  • 26

2 Answers2

1

You changed the python version. So, you have to give a new path according to the Python version. Just remove all older version and the current one and reinstall new Python v.3.8.1

night vision
  • 124
  • 5
0

You need to include base_library.zip in your application folder

kursun
  • 214
  • 2
  • 23