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

Using pandasgui in Colab #46

Closed
hmok opened this issue Oct 21, 2020 · 6 comments
Closed

Using pandasgui in Colab #46

hmok opened this issue Oct 21, 2020 · 6 comments

Comments

@hmok
Copy link

hmok commented Oct 21, 2020

Hi there,

I wonder if I can run pandasgui in google colab. I tried to use the following for a virtual display but did not work

!pip install pyvirtualdisplay
from pyvirtualdisplay import Display
Display(visible=0, size=(1400, 900)).start()

Any suggestion is greatly appreciated.

Cheers,
Hossein

@adamerose
Copy link
Owner

PandasGUI can be used with Jupyter Notebooks the same way as everywhere else but it will be not be embedded in the browser, it will appear in a separate window. I'm pretty sure it's impossible to embed PyQt widgets in Jupyter Notebooks (which Colab is based on).
I'm not familiar with pyvirtualdisplay and don't understand what your code is trying to do. You just need import show from pandasgui and use it as shown in the docs

@hmok
Copy link
Author

hmok commented Oct 24, 2020

Thank you. Yes you are right. I can easily run it on Jupyter Notebooks but Colab cannot run it. I was hoping there would be a way around it.

@adamerose
Copy link
Owner

So I tried it myself and the error I got was related to pynput, which is not totally necessary it just enhances the UX for drag-and-drop export of files... so I can just add a fallback to not use it if the import fails and maybe that will fix it.

@hmok
Copy link
Author

hmok commented Oct 24, 2020

That would be cool, if it helps. but the main issue is the "failed to acquire X connection" which I believe it has to do with X11 forwarding that may not be possible easily within Colab (or I don't know how to do it in fact!)

@adamerose
Copy link
Owner

@hmok I think it's an error thrown by pynput related to hardware detection

image

https://stackoverflow.com/questions/53919284/how-to-simulate-python-key-presses-in-google-collab-notebook

adamerose added a commit that referenced this issue Oct 24, 2020
@adamerose
Copy link
Owner

adamerose commented Oct 24, 2020

Okay so I just tried fixing this, but ran into a 2nd error after fixing the pynput error.
image

After doing more reading about Google Colab it sounds like it's not possible for Qt to work with it at all, so leaving this closed as not possible.

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

2 participants