unlicense icon indicating copy to clipboard operation
unlicense copied to clipboard

Building exe

Open modz2014 opened this issue 2 years ago • 2 comments

hi i get an error when running the application when using the following command like it compiles but when i run the build execution i get this error i ran pyinstaller unlicense.spec

im not sure im just wanting to add a icon as well i want to be able to write the command in cmd example unlicense.exe test.exe

Traceback (most recent call last): File "unlicense_main_.py", line 1, in File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module File "unlicense\application.py", line 7, in ModuleNotFoundError: No module named 'fire' [42480] Failed to execute script 'main' due to unhandled exception!

modz2014 avatar Sep 17 '22 14:09 modz2014

It's obvious that it needs a PyPi package named fire https://pypi.org/project/fire/

in order to fix it, install to your env, eg:

pip install fire

greenozon avatar Sep 17 '22 15:09 greenozon

this is when making a exe file so it can run on pc without python installed that why you use pyinstaller i have the fire installed

modz2014 avatar Sep 17 '22 15:09 modz2014

Hi @modz2014! You can look at the github actions for instructions on how to build an EXE with pyinstaller: https://github.com/ergrelet/unlicense/blob/943f783aeff2a1822e2053a6d852ac8adc1ee982/.github/workflows/py310-win64-ci.yml#L41

So with Poetry, it gives:

poetry install
poetry run pyinstaller unlicense.spec 

poetry install, basically installs the required dependencies in a dedicated virtual environment, which is necessary for pyinstaller to package everything, as @greenozon pointed out.

ergrelet avatar Oct 02 '22 19:10 ergrelet

Ok I think there is a bug I tried unpacking saying it unpacked but doesn't save it

modz2014 avatar Oct 29 '22 09:10 modz2014