Comments (5)
Thanks . It should help. I noticed last night when was asked to restart my
comp
On Nov 19, 2015 5:26 PM, "Al Sweigart" [email protected] wrote:
Pyperclip doesn't work on WIndows XP 32-bit (and possibly 64-bit too).
When installing, the following output is received:C:\Python34\Scripts>pip install pyperclip
Collecting pyperclip
Using cached pyperclip-1.5.24.zip
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "", line 20, in
File "C:\DOCUME1\admin\LOCALS1\Temp\pip-build-ncweabkc\pyperclip\setup.p
y", line 8, in
version=import('pyperclip').version,
File "C:\DOCUME1\admin\LOCALS1\Temp\pip-build-ncweabkc\pyperclip\pypercl
ip__init__.py", line 103, in
copy, paste = determine_clipboard()
File "C:\DOCUME1\admin\LOCALS1\Temp\pip-build-ncweabkc\pyperclip\pypercl
ip__init__.py", line 53, in determine_clipboard
return init_windows_clipboard()
File "C:\DOCUME1\admin\LOCALS1\Temp\pip-build-ncweabkc\pyperclip\pypercl
ip\windows.py", line 75, in init_windows_clipboard
wcscpy_s = ctypes.cdll.msvcrt.wcscpy_s
File "C:\Python34\lib\ctypes__init__.py", line 364, in getattr
func = self.getitem(name)
File "C:\Python34\lib\ctypes__init__.py", line 369, in getitem
func = self._FuncPtr((name_or_ordinal, self))
AttributeError: function 'wcscpy_s' not found----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\DOCUME
1\admin1\Temp\pip-build-ncweabkc\pyperclip
\LOCALSWhen I try to modify the code to use ctypes.cdll.msvcrt.wcscpy instead of
ctypes.cdll.msvcrt.wcscpy_s, this quick fix just results in this error:import pyperclip
pyperclip.copy('howdy')
Traceback (most recent call last):
File "", line 1, in
File "C:\Python34\pyperclip\windows.py", line 142, in copy_windows
if wcscpy_s(c_wchar_p(locked_handle), count, c_wchar_p(text)):
OSError: exception: access violation reading 0x00000006This is probably an issue that wcscpy_s doesn't exist in the old
msvcrt.dll. I was able to replicate this in a VM. I'm not sure if this can
be fixed by updating the dll, but we should come up with a better solution
than that.—
Reply to this email directly or view it on GitHub
#51.
from pyperclip.
Just my 5 cents: Windows XP is EOL, so IMHO there's really no reason to fix that.
from pyperclip.
I'm not sure, but may be runtime libraries will help?
https://www.microsoft.com/en-us/download/details.aspx?id=30679
from pyperclip.
Nonwithstanding my opinion on Windows XP support: IMO the best way to fix that is using , which we ultimately need to use anyway if we want to support other formats than text.memcpy
Edit: The suggestion below is certainly better.
from pyperclip.
The easiest and recommended way to copy memory is ctypes.memmove
. It is independent on the platform and libraries.
(It is similarly insecure as memcpy
, but in the context of preceding lines it is safe: The same size is copied that had been allocated.)
from pyperclip.
Related Issues (20)
- Python 3.11.1 - error pyperclip: No module named '_ctypes' HOT 1
- ERROR: No .egg-info directory found in C:\Users\Ni\AppData\Local\Temp\pip-pip-egg-info-y2n30vc4
- Multi-clipboard Support
- Condense Linux and macOS and support BSD, headless Linux
- TypeError: 'dict' object is not callable HOT 1
- WSL2 broken encoding with pyperclip? HOT 4
- sdist is missing tox.ini
- Test output is polluted by TEST HOT 2
- copy_xclip hangs the terminal when you try to exit
- Is this project still active? HOT 2
- ⚠️ This module looks like isn't maintained anymore, use alternative: Clipman 😇 HOT 2
- How can I copy a string? HOT 1
- Why can't I package a program with this using pyinstall?
- How do you use pyperclip in termux? HOT 1
- Klipper backend appears to fail silently on Plasma 6 + Wayland HOT 1
- xclip installed but: Pyperclip could not find a copy/paste mechanism for your system HOT 3
- Tests are broken in 1.9.0 release HOT 2
- Fix Popen to prevent signal passthrough
- CHANGES file is out of date
- Can't copy on WSL2 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyperclip.