2

When trying to build numpy on a linux platform, I can't make the configure script look in the right place. I use

python setup.py config --library-dirs=/software/intel/mkl/10.2.2.025/lib/em64t/

but then I get

mkl_info:
libraries mkl,vml,guide not found in /software/intel/mkl/10.2.2.025
libraries mkl,vml,guide not found in /software/intel/mkl/10.2.2.025/include
libraries mkl,vml,guide not found in /software/intel/mkl/10.2.2.025/lib

So it looks like it never actually looks into the subdirectory emt64/. The path I'm giving is also present in my LD_LIBRARY_PATH.

How can I give the script the right path?

Thanks in advance!

Gabriel
  • 21
  • 1
  • 2
  • What does your `site.cfg` file look like? – Joe Kington May 14 '11 at 21:54
  • 1
    are you sure the python executable you are using is 64 bit? try: file `which python` – sherpya Nov 09 '11 at 04:26
  • Had a similar problem with another package. My gotchas were; 1) make sure LD_LIBRARY_PATH is set and exported, and 2) using sudo drops environment's LD_LIBRARY_PATH, so 'setup.py bdist' as regular user, and 'sudo setup.py install' (if you install as root at all). – CAB Jan 30 '14 at 15:29
  • 1
    If you want to tell `pip install` where to find external libraries see https://stackoverflow.com/a/22942120/1843329 – snark Nov 18 '19 at 10:58

2 Answers2

0

Had a similar problem with rpy2. Did not have root permissions and could not alter the existing R installation or add to its core library directory. R was not built as a shared object library, so I could not link the rpy2 build to a libR.so.

I had to cross compile libR.so on a separate machine (same R version, same Linux family) and copy it to a different directory. I wanted that directory to be seen by setup.py.

Couldn't get -L to work on the command line. It appeared that this argument was deactivated.

(FAIL) python setup.py -L${LD_LIBRARY_PATH} build install

What I ended up doing was editing setup.py and changing a line that accepts library directory entries.

(old) r_libs = []

(new) [os.path.join('/root','path','to_my','install','R','lib'),]

Reran it as: python setup.py build install

Success!

Robert Casey
  • 1,511
  • 18
  • 19
-2

Perhaps

export PYTHONLIB="/software/intel/mkl/10.2.2.025/lib/em64t/"
python setup.py config
Atticus29
  • 4,190
  • 18
  • 47
  • 84