0

Whenever I try to install CMU PocketSphinx I get the error :

checking for Python include path... -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7
checking for Python library path... -L/Library/Frameworks/Python.framework/Versions/2.7/lib -lpython2.7
checking for Python site-packages path... /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages
checking python extra libraries... -ldl  -framework CoreFoundation 
checking python extra linking flags... -u _PyMac_Error Python.framework/Versions/2.7/Python
checking consistency of all components of python development environment... no
configure: error: in `/Users/username/Desktop/CMUSPHINX/sphinxbase-5prealpha':
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"
  ===========================================================================    =
   ERROR!
   You probably have to install the development version of the Python package
   for your distribution.  The exact name of this package varies among them.
  ===========================================================================    =

See `config.log' for more details

I have tried 'brew install python-dev' and have run 'brew install python'. I also have tried the './configure LDFLAGS="-L/c/Python27/libs"', but it won't work...

Any idea what I am doing wrong?

Nikolay Shmyrev
  • 24,897
  • 5
  • 43
  • 87
DaveTheAl
  • 1,995
  • 4
  • 35
  • 65

2 Answers2

1

You have an issue with python installation. Python on your system is dysfunctional as described here:

Vim failing to compile with python on OS X

You have following options:

  • Compile sphinxbase without python with configure flag --without-python
  • Fix python installation as described in the link above
  • Remove brew python and install python from sources/ports/use native python
Community
  • 1
  • 1
Nikolay Shmyrev
  • 24,897
  • 5
  • 43
  • 87
0

Running following command worked for me:

./configure PYTHON_EXTRA_LDFLAGS='-u _PyMac_Error /usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/Python'

hikkoiri
  • 3
  • 1
  • 2