5/30/2023 0 Comments Py installer![]() ![]() I've tested this script (and the generated executables) on both macOS and Ubuntu Linux so far, and it's worked perfectly in both cases. I solved this by adding each ModuleNotFoundError module to -hidden-import until it worked. ![]() I don't know what's going on with uvicorn here - I kept on running the script and then running dist/datasette and getting errors like this one: (pyinstaller-datasette) pyinstaller-datasette % dist/datasette ~/Dropbox/Development/datasette/fixtures.dbįile "click/core.py", line 829, in _call_įile "click/core.py", line 1259, in invokeįile "click/core.py", line 1066, in invokeįile "click/core.py", line 610, in invokeįile "datasette/cli.py", line 548, in serveįile "uvicorn/server.py", line 48, in runįile "asyncio/base_events.py", line 642, in run_until_completeįile "uvicorn/server.py", line 55, in serveįile "uvicorn/config.py", line 301, in loadįile "uvicorn/importer.py", line 23, in import_from_stringįile "uvicorn/importer.py", line 20, in import_from_stringįile "importlib/_init_.py", line 127, in import_moduleįile "", line 972, in _find_and_load_unlockedįile "", line 228, in _call_with_frames_removedįile "", line 984, in _find_and_load_unlocked PyInstaller supports Python 3.7 and newer, and correctly bundles many major Python packages such as numpy, matplotlib, PyQt, wxPython, and others. ![]() The user can run the packaged app without installing a Python interpreter or any modules. Datasette dynamically imports a list of default plugins so I had to explicitly list each of those. PyInstaller bundles a Python application and all its dependencies into a single package. The -hidden-import lines are needed because PyInstaller attempts to follow the module import graph for a package, but is very easily confused. hidden-import datasette.actor_auth_cookie \ ![]() add-data " $DATASETTE_BASE/static:datasette/static " \ add-data " $DATASETTE_BASE/templates:datasette/templates " \ A sample project showing how to provide PyInstaller hooks for your package and test them Python 15 GPL-3.0 12 0 0 Updated Apr 20, 2022. Export DATASETTE_BASE= $(python -c 'import os print(os.path.dirname(_import_("datasette")._file_)) ' ) \ Hi from what I understand you can obfuscate your scripts first then use pyinstaller normally selecting the obfuscated files and it will create your. ![]()
0 Comments
Leave a Reply. |