Glitchy_messG
Apify & Crawlee7mo ago
9 replies
Glitchy_mess

Packaging crawlee with pyinstaller

More of an open question, but has anyone had luck with using pyinstaller to package crawlee into an executable?
Currently getting a FileNotFoundError after packaging the script where crawlee can't find a file in Local\Temp\ [some random list of letters] \apify_fingerprint_datapoints\data\input-network-definition; pyinstaller has some stuff in its FAQ about import errors but this seems very specific?
Solution
yep, it ended up being a mix of the two acting weird
running something like
$env:PLAYWRIGHT_BROWSERS_PATH='0' #playwright config command to force it to acknowledge the browser you want to use because it breaks if you run pyinstaller by itself
>> playwright install firefox #use whatever browser you're using crawlee with
>> pyinstaller -F --collect-data apify_fingerprint_datapoints --collect-data playwright pythonScript.py

lets you grab the fingerprints before building the actual app itself
Was this page helpful?