AndyTheFactory / newspaper4k

📰 Newspaper4k a fork of the beloved Newspaper3k. Extraction of articles, titles, and metadata from news websites.
MIT License
476 stars 48 forks source link

Unable to build with pyinstaller #455

Open AndyTheFactory opened 1 year ago

AndyTheFactory commented 1 year ago

Issue by jackcrane Mon May 4 18:40:37 2020 Originally opened as https://github.com/codelucas/newspaper/issues/808


When I go to build my python program with PyInstaller to turn it into a windows exe, It throws an error: Unable to find "C:\Users\3jbc2\nltk_data" when adding binary and data files I have tried everything. Any ideas?

AndyTheFactory commented 1 year ago

Comment by EssbieWGT Tue May 19 17:04:14 2020


I ran into the same issue this morning. This resolved the issue: https://stackoverflow.com/questions/57128735/using-pyinstaller-with-nltk-results-in-error-cant-find-nltk-data

Also, part of my issue ended up being that I was using Python 3.8 which isn't supported by PyInstaller yet. Running pyInstaller with Python 3.7 in PipEnv resolved that issue as well. Now working just fine!

AndyTheFactory commented 1 year ago

Comment by iamunr4v31 Wed May 20 03:46:43 2020


Or, you could try and build a setup.py using setuptools and a bash script instead of an exe. Which results in virtually the same output, or so I think.