Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

While installing PSI4 on Edit: Ubuntu 13.10 (earlier Ubuntu 12.04), I'm encountering the following error:

configure: error: 
Could not link test program to Python. Maybe the main Python library has been
installed in some non-standard library path. If so, pass it to configure,
via the LDFLAGS environment variable.
Example: ./configure LDFLAGS="-L/usr/non-standard-path/python/lib"
 You probably have to install the development version of the Python package
 for your distribution.  The exact name of this package varies among them

Installation line :

../configure --prefix=/usr/local/psi4 --with-blas='-mkl' --with-incdirs=-mkl

Possible duplicates:

Where is python library installed?

Similar problems:

Python error while configuring mesos on centos

Error compiling a c++ with Python bindings using mingw and msys

Another possible solution on Ubuntu forums.

What I've tried:

I've install python-dev and python2.7-dev using apt-get. This is the solution mentioned in the first, second and fourth links. I still keep getting the same error.

What I don't understand:

  1. Is the problem coming because of the 32-bit compiler and 64-bit python mismatch mentioned in the third link (Error compiling...mingw...)?

  2. If the answer to 1 is yes, how do I make the compiler use 32-bit python?

P.S. Maybe this is irrelevant, but the log (before the error) pertaining to python

checking for a Python interpreter with version >= 2.6... python
checking for python... /usr/bin/python
checking for python version... 2.7
checking for python include statements... -I/usr/include/python2.7 -I/usr/include/python2.7
checking for python linker flags... -L/usr/lib/python2.7/config -lpthread -ldl -lutil -lm -lpython2.7 -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions
checking consistency of all components of python development environment... no
configure: error: 
share|improve this question
Sure you noted the note under "Python developer libraries correspo..." on this page‌​? – arsaKasra Apr 8 '14 at 10:07
Yes, I did. Using python2.7-config returns /usr/bin/python2.7-config --prefix|--exec-prefix|--includes|--libs|--cflags|--ldflags|--extension-suffix|-‌​-help|--configdir – theindigamer Apr 11 '14 at 2:36
up vote 2 down vote accepted

Your issue is not related to the installation of the development package for python but since you decided to use Intel’s MKL library to build PSI4 you have to have them properly installed somewhere.

For a Linux compilation though you could select the ATLAS library as stated in the Recommendations for BLAS and LAPACK libraries:

sudo apt-get install libatlas-dev

Then you'll be able to launch configure without any problem:

../configure --prefix=/usr/local/psi4 --with-blas='-lf77blas -latlas' --with-lapack='-llapack -lcblas'

Tested OK with psi4.0b5.tar.gz on 12.04 LTS and 13.10.

share|improve this answer
Why can I not use the MKL library? I installed the MKL library just fine. And how did you understand what the issue was? – theindigamer Apr 11 '14 at 14:52
Where did you dowbload it, so that I can try it too? – Sylvain Pineau Apr 11 '14 at 14:53
It can be downloaded from Intel's website, you just to have sign an agreement for non-commercial use and you have to wait for 1-2 hours to get a mail. In fact, I was also planning to use the Intel Parallel Studio XE (download similarly) which installs MKL. – theindigamer Apr 11 '14 at 14:57

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.