Skip to content

error with binary missing libraries #34

Closed

Description

@prietus

building from source on linux (arch linux)
python pyinstaller-build-script.py
the resultant binay fails to launch with
ist/Writing\ Tools Traceback (most recent call last): File "main.py", line 4, in <module> from WritingToolApp import WritingToolApp File "PyInstaller/loader/pyimod02_importers.py", line 384, in exec_module File "WritingToolApp.py", line 16, in <module> from aiprovider import Gemini15FlashProvider, OpenAICompatibleProvider File "PyInstaller/loader/pyimod02_importers.py", line 384, in exec_module File "aiprovider.py", line 6, in <module> import google.generativeai as genai ModuleNotFoundError: No module named 'google' [PYI-78365:ERROR] Failed to execute script 'main' due to unhandled exception! thanks in advance

Activity

  1. changed the title [-]error with binay missing libraries[/-] [+]error with binary missing libraries[/+] on Nov 1, 2024
  2. theJayTea commented on Nov 2, 2024

    @theJayTea
    Owner

    Hi! Have you installed all the requirements with pip install -r requirements.txt? It looks like google-generativeai isn't installed.

  3. prietus commented on Nov 3, 2024

    @prietus
    Author

    hello, yes I did

  4. momokrono commented on Nov 4, 2024

    @momokrono
    Collaborator

    Hi, I'm on arch as well, so I hope I can help you with this. Do you have the same problem if you run the main.py script? Do you use a virtual env?

  5. prietus commented on Nov 4, 2024

    @prietus
    Author
  6. momokrono commented on Nov 7, 2024

    @momokrono
    Collaborator

    Hi, sorry for the late reply but I'm extremely busy these days.

    If you are on Wayland, the app will not work. Wayland by default doesn't allow apps not in focus to listen to keypresses, so if you want the app to work you need to login with an X-session of whatever desktop environment you have.
    In your login window (and this is true whether you use GDM, SDDM, LightDM, whatever), you should see a menu where you will have different entries for your desktop environment and you can select what type of session to log into. Be sure to select something like "<your DE> on X", "<DE> legacy" or something like this. If you knew all this, sorry to sound condescending. I didn't want to sound like the average RTFM arch-dude, but hopefully this helps other people reading this.

    For me, Wayland is a must have, so I am able to use the app only with all apps running through Xwayland, like my IDE, my note editor and so on. If you run apps through Xwayland, the shortcut will work. If you want to know what apps are running through Xwayland you can run xlsclients in your terminal. You can install the package via pacman -S xorg-xlsclients.
    I know, it's less than ideal but as soon as I have some free time I plan to solve this problem. Most likely by finding a way to add a global shortcut or by creating a guide where you can setup a shortcut inside your DE. For now there is not much I can do.

    About the binary missing a library: weird, I'm not able to reproduce the problem on my side, but again I'll try to better help you once I'll have a bit more free time.

    Just as a note, I plan on creating a flatpak/appimage and uploading the package to the AUR. Again, once I'll have time to dedicate to this project.

  7. prietus commented on Nov 7, 2024

    @prietus
    Author
  8. theJayTea commented on Nov 10, 2024

    @theJayTea
    Owner

    Thanks for helping out, @momokrono ! It looks like this specific issue is resolved, maybe we can add that note about the DE into the README in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions