导致操作系统错误的 Pyperclip 复制

Pyperclip copy causing an OSerror

我正在尝试使用 https://automatetheboringstuff.com 学习 python。

在空闲时(Python 3.5 - 64 位),windows 8.1),pyperclip.copy('test')给出以下错误消息

pyperclip.copy('test') Traceback (most recent call last): File "", line 1, in pyperclip.copy('test') File "C:\Python\lib\site-packages\pyperclip__init__.py", line 53, in _copyWindows ctypes.cdll.msvcrt.wcscpy(ctypes.c_wchar_p(pchData), text) OSError: exception: access violation writing 0x0000000000000000

感谢任何帮助!

问题似乎是 Python 在某些 windows PC 上的 64 位版本。

我在使用与您相同版本的 Python 3.5(64 位 - Windows x86-64 可执行安装程序)时遇到了这个问题。我在 Python 3.4 中没有遇到这个问题,但我使用的是该版本的 32 位版本。我刚刚下载并安装了 Python 3.5 的 32 位版本(Windows x86 可执行安装程序),使用 pyperclip 时它没有给我带来问题。