Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Including custom Python (Anaconda Python) -lpython not found
Forum Updated to NodeBB v4.3 + New Features

Including custom Python (Anaconda Python) -lpython not found

Scheduled Pinned Locked Moved Installation and Deployment
2 Posts 2 Posters 1.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jlaura
    wrote on last edited by
    #1

    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?

    More information:

    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

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      hi and welcome to devnet,
      You might be missing the Python Dev package from your distribution.
      What distribution are you running ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved