Skip to content

BUG: pd.read_clipboard() not working in WSL2 #39379

Closed
@pandichef

Description

@pandichef
  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pandas.

  • (optional) I have confirmed this bug exists on the master branch of pandas.


Code Sample, a copy-pastable example

pd.read_clipboard()

Problem description

I recently started using WSL2 on Windows 10 Pro / Ubuntu 20.04 / Python 3.8.5. In general, It works incredibly well today (unlike in 2018). Unfortunately, pd.read_clipboard() and df.to_clipboard() don't work. I believe the problem is pandas because I got the desired functionality to work using pyperclip directly.

Error Message

pd.read_clipboard()
Traceback (most recent call last):
File "", line 1, in
File "/home/mickeymouse/.local/lib/python3.8/site-packages/pandas/io/clipboards.py", line 38, in read_clipboard
text = clipboard_get()
File "/home/mickeymouse/.local/lib/python3.8/site-packages/pandas/io/clipboard/init.py", line 649, in lazy_load_stub_paste
return paste()
File "/home/mickeymouse/.local/lib/python3.8/site-packages/pandas/io/clipboard/init.py", line 287, in call
raise PyperclipException(EXCEPT_MSG)
pandas.io.clipboard.PyperclipException:
Pyperclip could not find a copy/paste mechanism for your system.
For more information, please visit
https://pyperclip.readthedocs.io/en/latest/introduction.html#not-implemented-error

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugNeeds InfoClarification about behavior needed to assess issueNeeds TriageIssue that has not been reviewed by a pandas team member

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions