Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keyring NoKeyringError on pyinstaller | onefile #591

Open
idanless opened this issue Aug 29, 2022 · 2 comments
Open

Keyring NoKeyringError on pyinstaller | onefile #591

idanless opened this issue Aug 29, 2022 · 2 comments

Comments

@idanless
Copy link

Hi

I have centos 7 with Keyrings when I try do pyinstaller --onefile

i got this error below
keyring.errors.NoKeyringError: No recommended backend was available. Install a recommended 3rd party backend package; or, install the keyrings.alt package if you want to use the non-recommended backends. See https://pypi.org/project/keyring for details.

I read this error here but all the solutions for windows not working on Linux anyone have idea how to fix it ?
is look like i need added the KWallet but dont know how

@jaraco
Copy link
Owner

jaraco commented Aug 31, 2022

Keyring provides a hook for pyinstaller that's expected to help pyinstaller detect the necessary imports to make to ensure the backends are loaded, so probably the backends are getting loaded, but no backend is suitable.

On Windows and Mac, the problem is pretty straightforward, because those two platforms provide a fairly uniform and simply way to store/retrieve credentials. On Linux, the story is much more complicated, where there are many competing options, none of which is an obvious best one.

Nevertheless, keyring does its best to detect any available backend and use it. Since you're getting the error, that suggests that none of the backends are suitable, so you probably need some additional dependencies present and injected into the installer/onefile.

Questions to be answered - what backend do you expect to be used? What backend is in use for your application when pyinstaller isn't present? What libraries does that backend depend on and are those libraries available in the pyinstaller? Can you inject those libraries into your pyinstaller?

I'd start by creating a pyinstaller project that only invokes keyring and use it to inspect the environment. Look at things like keyring.core.get_keyring().

Hope that helps.

@AndreyNikiforov
Copy link

solved same/similar issue by using pyinstaller --collect-all keyrings.alt --hidden-import pkgutil

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants