简体   繁体   中英

I'm calling pyperclip but it says :No Module named 'qtpy'

>>> import pyperclip
>>> 
>>> 
>>> pyperclip.copy('Hi!')
Traceback (most recent call last):
  File "/home/dash/.local/lib/python3.11/site-packages/pyperclip/__init__.py", line 582, in determine_clipboard
    import qtpy  # check if qtpy is installed
    ^^^^^^^^^^^
ModuleNotFoundError: No module named 'qtpy'

I installed pyperclip it but it says:No module named 'qtpy' but I am actually calling to pyperclip

It means that you have to pip install the qtpy module.

In a terminal window:

pip install qtpy --user

Note: I recommend using the --user option in order to avoid possible collisions with packages used by the system.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM