How to use datas in PyInstaller

In my code, I set the file path to ./config and then set the datas to [(* * *,'./config')] in the spec. After packaging, the relative path of config to exe is./_ internal/config, How should I solve this problem?

Try reading the docs. Sticking ./config in Python code is broken – even without PyInstaller.

1 Like