Ask Your Question

LO 7.1 Python - Failed to load ctypes

asked 2021-02-09 19:06:46 +0200

Jim K gravatar image

updated 2021-02-09 19:09:55 +0200

Installed x64 on Windows and tested a python macro. It failed to load ctypes, so I ran python directly from the command line and got the following error:

PS C:\Program Files\LibreOffice\program> & ./python
Python 3.8.4 (default, Jan 28 2021, 10:59:35) [MSC v.1928 64 bit (AMD64)] on win32
>>> import ctypes
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Program Files\LibreOffice\program\python-core-3.8.4\lib\ctypes\", line 7, in <module>
    from _ctypes import Union, Structure, Array
ImportError: DLL load failed while importing _ctypes: The specified module could not be found.

Can anyone import the ctypes library in the 7.1 python distribution, or should I report it as a bug? My extension relies heavily on the module.

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted

answered 2021-02-12 15:11:09 +0200

Jim K gravatar image

This is a confirmed bug and will be fixed in LO 7.1.1.

edit flag offensive delete link more

answered 2021-02-19 10:08:23 +0200

ReinRalle gravatar image

Hi Jim,

yes, had already reported the bug - had the same problem (tried to work with "").

My workaround was to copy the missing file libffi-7.dll into the directory C:\Program Files\LibreOffice\program\python-core-3.8.4\lib (got this file from the Internet)


edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2021-02-09 19:06:46 +0200

Seen: 52 times

Last updated: Feb 19