打开/关闭搜索
搜索
打开/关闭菜单
通知
打开/关闭个人菜单
查看“Python”的源代码
来自OSSmedia
查看
阅读
查看源代码
查看历史
associated-pages
页面
讨论
更多操作
←
Python
因为以下原因,您没有权限编辑本页:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
[[分类:编程]] ===ubuntu将默认使用python2更改为默认使用python3的方法=== 直接执行这两个命令即可: sudo update-alternatives --install /usr/bin/python python /usr/bin/python2 100 sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 150 ==操作剪贴板== import pyperclip pyperclip.copy("写入剪贴板的内容") url =pyperclip.paste() linux error------- Traceback (most recent call last): File "/home/diao/python/qrcode.py", line 7, in <module> url =pyperclip.paste() File "/usr/local/lib/python3.7/dist-packages/pyperclip/__init__.py", line 640, in lazy_load_stub_paste return paste() File "/usr/local/lib/python3.7/dist-packages/pyperclip/__init__.py", line 303, in __call__ raise PyperclipException(EXCEPT_MSG) pyperclip.PyperclipException: Pyperclip could not find a copy/paste mechanism for your system. [https://pyperclip.readthedocs.io/en/latest/index.html#not-implemented-error For more information] 解决方法 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.
返回
Python
。