0

I am Using pydriod3 to learn python but I can't use the pyperclip module because of the error.

I searched clipboard in the Pip and tried downloading all the clipboard files no results. I have also search the web fir answer no results.

#This is my first time on stackoverflow so pardon me if I made a mistake;)

**This is the code:**
import pyperclip
pyperclip.copy('Hello world')
print(pyperclip.paste)


**This is the error message:**
Traceback (most recent call last):
  File "/data/user/0/ru.iiec.pydroid3/files/accomp_files/iiec_run/iiec_run.py", line 31, in <module>
    start(fakepyfile,mainpyfile)
  File "/data/user/0/ru.iiec.pydroid3/files/accomp_files/iiec_run/iiec_run.py", line 30, in start
    exec(open(mainpyfile).read(),  __main__.__dict__)
  File "<string>", line 2, in <module>
AttributeError: module 'pyperclip' has no attribute 'copy

[Program finished]
  • Please provide the code that produces the error, and the exact error message. You can add the code and error message to your question by pressing the `edit` button. – Marijn Aug 10 '23 at 20:24
  • How exactly did you install the library? When I try to install it from Pydroid 3 using Pip from the menuand then typing `pyperclip` I get `Error: pyperclip does not support Android yet`. Did you get that message as well? – Marijn Aug 13 '23 at 14:32
  • Related questions (also read the comments): https://stackoverflow.com/questions/68809164/is-there-a-way-to-copy-a-string-to-clipboard-that-works-on-any-operating-system and https://stackoverflow.com/questions/71099558/python-paste-text-copied-to-clipboard-on-android. – Marijn Aug 13 '23 at 14:38
  • Yes I got that message at first, Then I downloaded the module from this python site first ```https://pypi.org/project/pyperclip/ ```Then I Installed it using pip. – Chigozie Chinasi Aug 13 '23 at 17:04
  • Clearly this looks like an indication that the pyperclip module won't work on Android yet, please can you suggest another module that works with python and perform similar functions with it. – Chigozie Chinasi Aug 13 '23 at 17:08
  • As mentioned in the question I linked above (https://stackoverflow.com/questions/71099558/python-paste-text-copied-to-clipboard-on-android) the Kivy library has clipboard functionality for Android, and currently works with Python versions up to 3.11. – Marijn Aug 14 '23 at 04:21

0 Answers0