On 15Oct2019 1143, MRAB wrote:
On 2019-10-15 19:03, MRAB wrote:
I've installed pywin32 on Python 3.8, but when I try to import
win32clipboard it says it can't find it:
Python 3.8.0 (tags/v3.8.0:fa919fd, Oct 14 2019, 19:37:50) [MSC v.1916 64
bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import win32
>>> import win32clipboard
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: DLL load failed while importing win32clipboard: The
specified module could not be found.
>>>
Does anyone else have this problem?
I found the solution: copy pywintypes38.dll and pythoncom38.dll from
site-packages/pywin32_system32 into site-packages/win32.
The new os.add_dll_directory() function [1] is a way for pywin32 to work
around this themselves without having to relocate files. The note in the
doc also explains the cause.
Cheers,
Steve
[1]: https://docs.python.org/3.8/library/os.html#os.add_dll_directory
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at
https://mail.python.org/archives/list/python-dev@python.org/message/SIXLMFOZ6KZUMVWT2RY5XBMRSMUBFCG5/
Code of Conduct: http://python.org/psf/codeofconduct/