New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Including asyncpg in PyInstaller-created executable? #596
Comments
@makkus Some fixes were pushed to the master branch, can you retry ? |
I had to do some tweaking in order for the imports to work properly. I haven't had any luck with the current release though, so I'm using the one on git. The following works on Python3.8, Pyinstaller 4.1: echo "import asyncpg" > test.py
python -m pip install git+https://github.com/MagicStack/asyncpg.git@3d0e23fedfc39d5bd9732911288ad6c33147b525
pyinstaller -F --hidden-import=asyncpg.pgproto.pgproto --hidden-import=uuid --hidden-import=ipaddress test.py
./dist/test |
Having same issue with python 3.7 and pyinstaller 4.9 and asyncpg 0.25. And not sure how to adapt the above solution on a Windows/PyCHarm setup. Thank you for the help. Best |
@nono-london have you tried one of the latest versions? It should solve the issue. Otherwise, you can use:
That I'm pretty sure fixes the issue. |
In the end I could't resolve the issue. Could be another problem with me not handling correctly asyncio with pyinstaller. |
Hmm, it's hard to say what could be going wrong, but to me main main points would be:
|
I guess this is less a feature request as a call to see whether anyone has done this before (apologies if this is not the right venue for this): create an executable binary with PyInstaller that includes asyncpg. I've tried today, but had problems with the binary/C parts of asyncpg, and could not get it to include everything necessary. If anyone has done so successfully, would they mind sharing their implementation?
The text was updated successfully, but these errors were encountered: