Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to link permanently MKL libraries to Numpy in Linux?
    primarykey
    data
    text
    <p>I built Numpy with the MKL libraries from Intel (a difficult process for me, it took my whole day!). Numpy needs to be linked to the MKL library with the LD_LIBRARY_PATH environment variable, or at least this is the way I do it... So I use export in .bashrc to save the path and when I start a new console and run python, Numpy is correctly loaded with the libraries.</p> <p>The problem is that it does not work with Eclipse which I use with Pydev to develop my programs. I still can add LD_LIBRARY_PATH somewhere in the preferences of Eclipse but the issue becomes real when I try to install Scipy. The installation script of Scipy needs to import Numpy and even when LD_LIBRARY_PATH is correctly set, I still have an error with the MKL libraries that cannot be imported:</p> <pre><code>$ sudo python setup.py install Traceback (most recent call last): File "setup.py", line 208, in &lt;module&gt; setup_package() File "setup.py", line 145, in setup_package from numpy.distutils.core import setup File "/usr/local/lib/python2.7/dist-packages/numpy/__init__.py", line 137, in &lt;module&gt; import add_newdocs File "/usr/local/lib/python2.7/dist-packages/numpy/add_newdocs.py", line 9, in &lt;module&gt; from numpy.lib import add_newdoc File "/usr/local/lib/python2.7/dist-packages/numpy/lib/__init__.py", line 4, in &lt;module&gt; from type_check import * File "/usr/local/lib/python2.7/dist-packages/numpy/lib/type_check.py", line 8, in &lt;module&gt; import numpy.core.numeric as _nx File "/usr/local/lib/python2.7/dist-packages/numpy/core/__init__.py", line 5, in &lt;module&gt; import multiarray ImportError: libimf.so: cannot open shared object file: No such file or directory </code></pre> <p>libimf.so is one of the shared libraries of MKL that I have to link. Apart from directly modifying the <code>__init__.py</code> file of Numpy (which I rather avoid because there may be a cleaner way to do that) I don't know what to do to permanently link Numpy to the MKL libraries.</p> <p>Thanks for your help!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload