1

I've read all the other questions referencing this issue and tried the solutions but can't seem to get pyperclip working in Mu.

When I try running:

>import pyperclip 
>pyperclip.copy('Hello, world') 
>pyperclip.paste()

I get the following error:

Traceback (most recent call last):
  File "/home/andy/.local/share/mu/mu_venv-38-20210813-134953/lib/python3.8/site-packages/qtpy/__init__.py", line 204, in <module>
    from PySide import __version__ as PYSIDE_VERSION  # analysis:ignore
ModuleNotFoundError: No module named 'PySide'


During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/andy/mu_code/.py", line 3, in <module>
    pyperclip.copy('hello')
  File "/home/andy/.local/share/mu/mu_venv-38-20210813-134953/lib/python3.8/site-packages/pyperclip/__init__.py", line 658, in lazy_load_stub_copy
    copy, paste = determine_clipboard()
  File "/home/andy/.local/share/mu/mu_venv-38-20210813-134953/lib/python3.8/site-packages/pyperclip/__init__.py", line 582, in determine_clipboard
    import qtpy  # check if qtpy is installed
  File "/home/andy/.local/share/mu/mu_venv-38-20210813-134953/lib/python3.8/site-packages/qtpy/__init__.py", line 210, in <module>
    raise PythonQtError('No Qt bindings could be found')
qtpy.PythonQtError: No Qt bindings could be found
blackbrandt
  • 2,010
  • 1
  • 15
  • 32
Andy Choy
  • 11
  • 1
  • What platform are you running on (macos/windows/linux (which))? How did you install mu? How did you install pyperclip? – larsks Aug 16 '21 at 13:44
  • You need to install PySide: https://pypi.org/project/PySide/ – Peter Wood Aug 16 '21 at 13:48
  • When I try to install PySide (pip pyside2) I get this message:
    Requirement already satisfied: pyside2 in ./.local/lib/python3.8/site-packages (5.15.2)
    Requirement already satisfied: shiboken2==5.15.2 in ./.local/lib/python3.8/site-packages (from pyside2) (5.15.2)
    
    – Andy Choy Aug 16 '21 at 14:04
  • I'm using Linux (Ubuntu 20.04.2). I installed mu by typing the following into the command prompt: 'pip3 install mu-editor==1.1.0b5'. – Andy Choy Aug 16 '21 at 14:10
  • Seems pyperclip is working in IDLE3 but not Mu. Thoughts? – Andy Choy Aug 16 '21 at 14:38
  • Eureka!!! I needed to install xclip and xsel manually for some reason. Works now! THANKS! – Andy Choy Aug 16 '21 at 15:00

0 Answers0