We will be migrating from Ask to Discourse on the first week of August, read the details here

Ask Your Question

LO 7.1 Python - Failed to load ctypes [closed]

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

Jim K gravatar image

updated 2021-07-03 16:03:07 +0200

Alex Kemp gravatar image

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\__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.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2021-07-03 16:03:19.795775

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 "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)


edit flag offensive delete link more

Question Tools

1 follower


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

Seen: 86 times

Last updated: Feb 19