Page MenuHomePhabricator

Pandas to_clipboard function does not work in remote environments like PAWS
Closed, DeclinedPublic

Description

Pandas has a to_clipboard function, which I'd find very useful to quickly move data from Pandas into a spreadsheet program.

However, it can't currently be used on PAWS since the required dependencies can't be installed. Attempting to use it raises the following error:

NoClipboardProgramError: Pyperclip requires the gtk, PyQt4, or PySide module installed, or either the xclip or xsel command.

The Pandas installation docs reiterate this (with links):

Optional Dependencies:
...

  • One of PyQt4, PySide, pygtk, xsel, or xclip: necessary to use read_clipboard(). Most package managers on Linux distributions will have xclip and/or xsel immediately available for installation.

A regular user can't install system packages, and none of the three Python modules can be simply installed with PIP (I can elaborate if necessary).

This is the same on both Labs and internal PAWS.

Event Timeline

Unfortunately even if you do install them it won't work - to_clipboard will only work when the python process is running on *your* computer, while with PAWS the python process is running on a server somewhere and you're only interacting with it via a web browser. So even if we did install these things, to_clipboard won't work unfortunately :(

We could attempt to possibly write a replacement that'll work in a notebook that's used remotely (like PAWS) though.

Unfortunately even if you do install them it won't work - to_clipboard will only work when the python process is running on *your* computer, while with PAWS the python process is running on a server somewhere and you're only interacting with it via a web browser. So even if we did install these things, to_clipboard won't work unfortunately :(

Ah, that makes sense.

We could attempt to possibly write a replacement that'll work in a notebook that's used remotely (like PAWS) though.

That would be great, but I understand if it's pretty low on your to-do list :)

nshahquinn-wmf renamed this task from PAWS lacks packages needed to use the Pandas to_clipboard function to Pandas to_clipboard function does not work in remote environments like PAWS.Jan 19 2017, 7:29 PM
nshahquinn-wmf triaged this task as Low priority.

Closing, since the modle of pasting won't really ever work with remote kernels like PAWS :)

Closing, since the modle of pasting won't really ever work with remote kernels like PAWS :)

I'm thrilled that you declined this, just because it means seeing you around in this little virtual world :)