Is there a standard process in locating files in Python? If I have a data file my code is using as reference, different packaging managers store the files in different locations.
Was recommended to use:
import pkg_resources
resource_pkg = pkg_resources.get_distribution('MY_FILE_HERE').location
However, if I use something like pyinstaller, packaging my code as a .exe, the file location is not installed with pkg_resources anymore and my code is now broken. Is there a common process that all package managers follow? Else I would have to rely on environmental variables? What would be the method with pyinstaller?