0

Trying to embed anaconda Python into a Qt application. As a first step, I just want to get Python.h including properly.

I am running Qt4, Python 2.7.9, and OS X 10.9.

The project.pro has:

INCLUDEPATH += /home/myuser/anaconda/include/python2.7 /home/myuser/anaconda/include

LIBS += -L/home/myuser/anaconda/lib/python2.7 -lpython2.7

appended to the end.

In spite of this, I am getting the system installed python 2.7.5. This is verified by running import sys, sys.version and sys.path.

Clearly, I am missing something - a compiler flag? New to QtCreator, so any insight appreciated.

Jzl5325
  • 3,898
  • 8
  • 42
  • 62
  • in a terminal type `which python`. And then you can also put `python --version`. If it isn't the one you want, then it is sitting in your `PATH` variable. Often times the path variable gets edited in `~/.bashrc` and `~/.bash_profile`. Open both of those files and check to see if you `PATH` variable is getting appended or prepended there. There may also be other environmental variables that python uses that have been set for your system. – phyatt Jan 23 '15 at 00:06
  • @phyatt all environment variables are properly set. Anaconda is normal working Python, so no issues in having it run via `python`. I wonder if the `qmake` being used by QTCreator is not using some other environment variables? The command line qmake is one that I have installed via homebrew. Presumably this is the `qmake` QTCreator is also using? – Jzl5325 Jan 23 '15 at 13:54

0 Answers0