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

Could not find the Qt platform plugin "xcb" #8541

Closed
pysoft13 opened this issue May 15, 2024 · 7 comments
Closed

Could not find the Qt platform plugin "xcb" #8541

pysoft13 opened this issue May 15, 2024 · 7 comments
Labels
solution:not enough info Not enough info has been provided to solve or help. Fill out the issue template

Comments

@pysoft13
Copy link

Description of the issue

python application run fines when running the python script but doesn't launch one 'compiled' with pyinstaller with one_file option.
same app works great with pyinstaller on red hat 7, i'm not able to run the pyinstaller executable on red hat 8

Context information (for bug reports)

  • Output of pyinstaller --version: 6.6.0
  • Version of Python:
  • Platform:
  • How you installed Python:
  • Did you also try this on another platform? Does it work there?
    works on red hat 7, not on red hat 8

NO Errors on pyinstaller log, executable is well generated but crashes with the xcb error.

@pysoft13 pysoft13 added the triage Please triage and relabel this issue label May 15, 2024
@rokm
Copy link
Member

rokm commented May 15, 2024

Either you are missing a low-level dependency of the xcb platform plugin on the target system, or there is a conflict between shared libraries collected from the build RHEL7 system and the run-time RHEL8 system.

In general, there are no guarantees about cross-distribution compatibility (or across different versions of the same distribution), especially with complex GUI frameworks.

I suppose you could try debugging this by creating a onedir build, and then try running ldd against the xcb plugin shared lib (with LD_LIBRARY_PATH set to the frozen application's _internal directory) on the target system. That would tell you if there is a missing library.

@bwoodsend
Copy link
Member

Can you clarify what the build and runtime environments are in the failing case? Are you building on RHEL7 then running on 8 or building and running on 8? And which Qt variant is this? And are you installing it from PyPI or RedHat repositories?

@toledo-labs
Copy link

toledo-labs commented May 24, 2024

I'm having the same problem on Ubuntu 22.04 my app runs in terminal but cannot run with a pyinstaller binary

@rokm
Copy link
Member

rokm commented May 24, 2024

I'm having the same problem on Ubuntu 22.04 my app runs in terminal but cannot run with a pyinstaller binary

What Qt bindings are you using, and how did you install them (pip, apt, ...)?

@toledo-labs
Copy link

toledo-labs commented May 25, 2024

I'm building in a virtual env setup by qtcreator. The Qt and app dependencies were install via pip.
Screenshot from 2024-05-25 05-34-38

However the qtcreator IDE in order to startup is binded to a Qt library from by home directory. The library was built from source. Thanks for replying

@rokm
Copy link
Member

rokm commented May 25, 2024

I'm building in a virtual env setup by qtcreator. The Qt and app dependencies were install via pip. Screenshot from 2024-05-25 05-34-38

However the qtcreator IDE in order to startup is binded to a Qt library from by home directory. The library was built from source. Thanks for replying

You need to install PyInstaller in that virtual environment, and ensure that you are running PyInstaller that is installed in that virtual environment (and not some other instance that you may happen to have in PATH).

@toledo-labs
Copy link

Ok, pyinstaller was installed in the virtual env but I still had one more thing to do. I had to remove the Qt library in my home directory that qtcreator uses to start up. The virtual env still uses the OS
env variables: LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/home/toledo/Qt/lib/". Once I removed this library or its path it worked. Thank you sir.

@bwoodsend bwoodsend added solution:not enough info Not enough info has been provided to solve or help. Fill out the issue template and removed triage Please triage and relabel this issue labels May 29, 2024
@bwoodsend bwoodsend closed this as not planned Won't fix, can't repro, duplicate, stale May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
solution:not enough info Not enough info has been provided to solve or help. Fill out the issue template
Projects
None yet
Development

No branches or pull requests

4 participants