Hi, > Pynbody does have a configuration file, which is however contained within its package directory. I’d assume that all of these files are imported by PyInstaller; most likely I’m mistaken. > I'm not sure pyinstaller simply wraps entire package directories as a group of files, though others may have deeper knowledge.
I can confirm that PyInstaller doesn't do anything of the sort I'm afraid. If you compile in 1 dir mode you may see folders inside named after packages such as numpy but that is because a dedicated hook file has been written for that package which explicitly specifies the data files to include and how to structure them. I imagine your problem is just that config file isn't being bundled. The config filename is specified here <https://github.com/pynbody/pynbody/blob/0b63e9be4aa34c6577f37bbd18f2261c2b2f0336/pynbody/configuration.py#L23> in the source code. It uses the __file__ attribute which gets a bit ugly in PyInstaller but I'm fairly certain if you use the following it should work. --add-data /full/path/to/site-packages/pynbody/default_config.ini;pynbody/ default_config.ini I'm afraid I can't test it as I don't have the compiler necessary to install pynbody but it's something I've had to do with other packages. If it doesn't work, try adding a print statement before the read command in pynbody's source code that prints the filename it is trying to read and post the output here. Brénainn Brénainn -- You received this message because you are subscribed to the Google Groups "PyInstaller" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/e610eaed-660c-4b94-9405-d0f7e54389ab%40googlegroups.com.
