Ask Your Question

numpy in LibreOffice Calc

asked 2018-03-25 17:42:06 +0200

ERM gravatar image

updated 2018-03-25 17:43:48 +0200

I need to run python macros in LibreOffice Calc that require numpy. Unfortunately, the python version that comes with LibreOffice does not have numpy installed. I tried to install it, but failed (I am a Mac user). Has anyone been able to use numpy with LibreOffice Calc? If you have, please let me know how you managed. Thanks!

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2018-12-06 16:35:11 +0200

kak gravatar image

You may have figured it out by now, but in case not, I had been using numpy successfully in a Python calc macro (indirectly via an import of matplotlib.pyplot). Whenever I updated LibreOffice, I would copy several packages over, for example:

cp -r /anaconda/lib/python3.5/site-packages/numpy* /Applications/

Since I was using numpy with matplotlib, these are the all the packages I had to copy over:


I also added /anaconda/lib/python3.5/site-packages to the DYLD_FALLBACK_LIBRARY_PATH environment variable in my .bashrc file.

However, after recent updates of some python packages, I can't get past this error:

Message: <class 'ImportError'>: 
Importing the multiarray numpy extension module failed.  Most
likely you are trying to import a failed build of numpy.
If you're working with a numpy git repo, try `git clean -xdf` (removes all
files not under version control).  Otherwise reinstall numpy.

Original error was: cannot import name 'multiarray'
 (or 'type_check.*' is unknown)

I've tried several different versions of Python and the above packages using conda environments, but I've not gotten my macro to work again. I'd be interested to know if/how you solved your numpy issue, and with what versions of the above packages.


edit flag offensive delete link more
Login/Signup to Answer

Question Tools



Asked: 2018-03-25 17:42:06 +0200

Seen: 319 times

Last updated: Dec 06 '18