LO 7.1 Python - Failed to load ctypes

Installed 7.1.0.3 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\__init__.py", 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.

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

Hi Jim,

yes, had already reported the bug - had the same problem (tried to work with “get-pip.py”).

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)

Ralf