pandas_profiling out-of-the-box PyInstaller compatibility #968
Replies: 4 comments 1 reply
-
The package is not optimized to be embedded, but considering the interest we can treat this as a feature request, and welcome the community to contribute. Specifically, @Bilgehanaygn would you be interested to resolving this issue and contributing a pull request? |
Beta Was this translation helpful? Give feedback.
-
The first step to embedding in PyInstaller is to ensure the are resolved correctly after installation. A fix for the template could be: # Initializing Jinja
if getattr(sys, 'frozen', False):
# Support for PyInstaller
bundle_dir = sys._MEIPASS
package_loader = jinja2.FileSystemLoader(bundle_dir)
else:
package_loader = jinja2.PackageLoader(
"pandas_profiling", "report/presentation/flavours/html/templates"
) Then, by including the templates and ensuring the configuration files are present at the right location, one is much closer towards being able to creating a functioning executable. Leaving this here as a starting point for anyone particularly interested in the feature. Feel free to reach out here or on Slack if you're interested in contributing this feature. |
Beta Was this translation helpful? Give feedback.
-
I would like to use ydata-profiling as exe. I can convert .py to exxe. But when run to exe, bellow cause error. I try .py adding the code Initializing Jinjaif getattr(sys, 'frozen', False): |
Beta Was this translation helpful? Give feedback.
-
Estou tendo o mesmo problema; o programa roda normal no ambiente de desenvolvimento, porém ao rodar o .exe criado com Pyisntaller recebo o erro: ValueError: The 'ydata_profiling' package was not installed in a way that PackageLoader understands. |
Beta Was this translation helpful? Give feedback.
-
I have a small application which imports pandas_profiling and runs fine when I run the code in editor. The problem is when I convert applicaiton into .exe, I got an error which says: "ValueError: The 'pandas_profiling' package was not installed in a way that PackageLoader understands.".
I have tried many ways to resolve the problem, tried different versions, fetch package to local etc. still the same error...
Is the package appropriate to use with .exe
Beta Was this translation helpful? Give feedback.
All reactions