Reputation: 743
After running
python -m nuitka --plugin-enable=pylint-warnings --follow-imports --standalone sample.py
it completes the build without any error but when I run the build sample file from sample.dist directory it gives
Traceback (most recent call last):
File "[PATH TO PROJECT]/sample.dist/pkg_resources/__init__.py", line 359, in get_provider
KeyError: 'pyfiglet.fonts'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "[PATH TO PROJECT]/sample.dist/yarasilly2.py", line 183, in <module>
File "[PATH TO PROJECT]/sample.dist/pyfiglet/__init__.py", line 794, in __init__
File "[PATH TO PROJECT]/sample.dist/pyfiglet/__init__.py", line 801, in setFont
File "[PATH TO PROJECT]/sample.dist/pyfiglet/__init__.py", line 126, in __init__
File "[PATH TO PROJECT]/sample.dist/pyfiglet/__init__.py", line 136, in preloadFont
File "[PATH TO PROJECT]/sample.dist/pkg_resources/__init__.py", line 1134, in resource_exists
File "[PATH TO PROJECT]/sample.dist/pkg_resources/__init__.py", line 361, in get_provider
ModuleNotFoundError: No module named 'pyfiglet.fonts'
Nuitka version, full Python version and Platform (Windows, OSX, Linux ...)
python -m nuitka --version
0.6.8.4
Python: 3.8.3 (default, May 29 2020, 00:00:00)
Executable: [PATH TO PROJECT]/venv/bin/python
OS: Linux
Arch: x86_64
pip install nuitka
from pyfiglet import Figlet
if __name__ == '__main__':
f = Figlet(font='slant')
puts(colored.blue(f.renderText("Sample Text")))
Upvotes: 0
Views: 2043
Reputation: 11
I met the same problem and after reading the user guide I found a solution.
python -m nuitka --plugin-enable=pylint-warnings --follow-imports --standalone sample.py --include-package=pyfiglet --include-data-dir={PATH-TO-PYFIGLET-LIB}=pyfiglet
Upvotes: 1
Reputation: 91
Try the below code in the jupter notebooks
! pip install pyfiglet
Input the above code before you start your work..! Let me know if that works.... And also support me, that brings motivation for further.
Upvotes: 1