前提・実現したいこと
pyperclipが使いたいのですが、うまくコピーとペーストができません。
下記のサイトを見ましたが、4つの対策をどうやって実現すればよいのかがわかりません。
ターミナルからvagrantを起動して、.pyファイルを呼び出していますが、下記のエラーコードがでます。
https://pyperclip.readthedocs.io/en/latest/introduction.html#not-implemented-error
sudo apt-get install xsel to install the xsel utility.
sudo apt-get install xclip to install the xclip utility.
pip install gtk to install the gtk Python module.
pip install PyQt4 to install the PyQt4 Python module.
発生している問題・エラーメッセージ
Traceback (most recent call last): File "clip1.py", line 2, in <module> pyperclip.copy("hello") File "/home/vagrant/.pyenv/versions/3.5.2/lib/python3.5/site-packages/pyperclip/__init__.py", line 595, in lazy_load_stub_copy return copy(text) File "/home/vagrant/.pyenv/versions/3.5.2/lib/python3.5/site-packages/pyperclip/__init__.py", line 284, in __call__ raise PyperclipException(EXCEPT_MSG) pyperclip.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
該当のソースコード
Python
1import pyperclip 2pyperclip.copy("hello") 3print(pyperclip.paste())
試したこと
pip install PyQt4 やpip install gtkでは下記のエラーがでました。
Could not find a version that satisfies the requirement PyQt4 (from versions: )
No matching distribution found for PyQt4
補足情報(FW/ツールのバージョンなど)
python3.5.2
Mac OS high sierra
mac book pro
回答1件
あなたの回答
tips
プレビュー