Giter VIP home page Giter VIP logo

Comments (8)

JackMcKew avatar JackMcKew commented on September 26, 2024

Could you please share your .spec file. I have a suspicion that it may need to be specified in the .spec file exactly where to look for _tkinter in the analysis tree, likein the documentation here: https://pyinstaller.readthedocs.io/en/stable/spec-files.html.

PS, to confirm, this executable is intended to run on Linux yes?

from pyinstaller-action-linux.

ThePieBandit avatar ThePieBandit commented on September 26, 2024

Spec file is available here, as is my project: https://github.com/ThePieBandit/TCG-to-Deckbox/blob/releaseActions/src/tcg-to-deckbox.spec. I've tried entering tkinter and _tkinter to no effect

I am trying to run this on linux, eventually I plan on using your other repo to have a github action create a windows executable as well

from pyinstaller-action-linux.

ThePieBandit avatar ThePieBandit commented on September 26, 2024

My understanding is that tkinter is supposed to be a built in python module, but admittedly I'm pretty new at python.

from pyinstaller-action-linux.

JackMcKew avatar JackMcKew commented on September 26, 2024

This was a real doozy in the end!

Turns out that Linux doesn't have the binaries for Tkinter by default, and thus you must install them before installing Python.

I've added an argument now that will uninstall Python, install the Tkinter binaries, and install Python again if the user has specified tkinter to be true in their action.yml. This can be seen in release 0.1.4 https://github.com/JackMcKew/pyinstaller-action-linux/releases/tag/0.1.4.

I forked your example repo until I got it working, for which you can see it successfully packaging here: https://github.com/JackMcKew/TCG-to-Deckbox/actions/runs/229445716

I don't have a linux machine ready at the moment, so it is unverified whether the application works as intended.

I hope this has fixed the issue for you, and I'm unsure whether the Windows pyinstaller action will behave similarly, but please raise an issue if it does.

from pyinstaller-action-linux.

ThePieBandit avatar ThePieBandit commented on September 26, 2024

Unfortunately, it still isn't working. I can see your github action doing more things like installing tk, but I still don't see pyinstaller picking it up.

https://github.com/ThePieBandit/TCG-to-Deckbox/actions/runs/229650750

from pyinstaller-action-linux.

JackMcKew avatar JackMcKew commented on September 26, 2024

Ah thank you for raising this again. The error was due to .bashrc not being sourced correctly and the Github Action user not being able to access Pyenv to recompile Python after Tkinter was installed.

I have now fixed this as you can see in this runtime (https://github.com/JackMcKew/TCG-to-Deckbox/runs/1044598608?check_suite_focus=true), note the line within the Pyinstaller Linux step:

4073 INFO: Loading module hook 'hook-_tkinter.py' from '/root/.pyenv/versions/3.7.5/lib/python3.7/site-packages/PyInstaller/hooks'...

Since this dramatically slows down the action (from uninstalling Python, install Tkinter and recompiling Python), I've decided to leave this on a separate branch of the action. This can be used by specifying the tkinter branch (eg JackMcKew/pyinstaller-action-linux@tkinter).

Note that I still cannot 100% test that this is fully working on a linux machine, but I believe this is a step in the right direction. Please close the issue if this has solved this problem for you 👍

PS, I also tested on the Windows pyinstaller action which did not have this amount of trouble, please find the logs: https://github.com/JackMcKew/TCG-to-Deckbox/runs/1044515031?check_suite_focus=truehttps://github.com/JackMcKew/TCG-to-Deckbox/runs/1044515031?check_suite_focus=true

from pyinstaller-action-linux.

ThePieBandit avatar ThePieBandit commented on September 26, 2024

Looks like it works! I tested the app you built and no errors are raised.

from pyinstaller-action-linux.

JackMcKew avatar JackMcKew commented on September 26, 2024

Fantastic! Thank you for raising this

from pyinstaller-action-linux.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.