PyInstaller and custom module

Viewed 95

I have one file with my own utils I use in many projects. In order not to copy it to every single project and manually pip install everything needed, I decided to make module out of it.

However, when I use PyInstaller to create .exe file from project and try to run it, I get error:

Python path configuration:
  PYTHONHOME = 'C:\Users\Adam\AppData\Local\Temp\_MEI102882'
  PYTHONPATH = (not set)
  program name = 'C:\Users\Adam\Desktop\Praca\TEST\dist\main.exe'
  isolated = 0
  environment = 0
  user site = 0
  import site = 0
  sys._base_executable = 'C:\\Users\\Adam\\Desktop\\Praca\\TEST\\dist\\main.exe'
  sys.base_prefix = ''
  sys.base_exec_prefix = ''
  sys.platlibdir = 'lib'
  sys.executable = 'C:\\Users\\Adam\\Desktop\\Praca\\TEST\\dist\\main.exe'
  sys.prefix = ''
  sys.exec_prefix = ''
  sys.path = [
    'C:\\Users\\Adam\\AppData\\Local\\Temp\\_MEI102882\\base_library.zip',
    'C:\\Users\\Adam\\AppData\\Local\\Temp\\_MEI102882\\lib-dynload',
    'C:\\Users\\Adam\\AppData\\Local\\Temp\\_MEI102882',
  ]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
Python runtime state: core initialized
LookupError: unknown encoding: utf-8

Current thread 0x000022ac (most recent call first):
  <no Python frame>

I'm not even sure what to do now. I see that some paths refer to Temp folder, don't know, however, if this is how it should be.

0 Answers
Related