codelucas / newspaper

newspaper3k is a news, full-text, and article metadata extraction in Python 3. Advanced docs:
https://goo.gl/VX41yK
MIT License
14.15k stars 2.12k forks source link

Unable to build with pyinstaller #808

Open jackcrane opened 4 years ago

jackcrane commented 4 years ago

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?

EssbieWGT commented 4 years ago

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!

AshwinSankar17 commented 4 years ago

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.