Including custom Python (Anaconda Python) -lpython not found
jlaura last edited by
I am attempting to compile a simple QtCreator project, written in C++, and include the non-system python installation.
Via creator, I have added a new external library (linux only). This adds:
unix: LIBS += -L$$PWD/../../../anaconda/lib/ -lpython2
INCLUDEPATH += $$PWD/../../../anaconda/include/python2.7
DEPENDPATH += $$PWD/../../../anaconda/include/python2.7
to the .pro file.
The PATHS are all correct, but I am getting a cannot find -lpython2 error. I see that libpython2.7.so is linking to libpython2.7.so.1.0, could this be the issue and if so, what is the accepted solution?
What other issues could be causing the lib not to be found?
python-config --cflags reports
-I/home/jay/anaconda/include/python2.7 -I/home/jay/anaconda/include/python2.7 -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes
I have tried -lpython2, -lpython, -lpython2.7
hi and welcome to devnet,
You might be missing the Python Dev package from your distribution.
What distribution are you running ?