1

thanks in advance for any help!

I'm trying to install a set of Python 2.7.5 libraries using Pip 1.5.2. I'm following the directions to install NuPIC on my mac (OS X Mavericks). Everything was going fine until I ran this line:

sudo pip install --allow-all-external --allow-unverified PIL --allow-unverified psutil -r $NUPIC/external/common/requirements.txt

I got this error:

building '_imagingft' extension

cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -I/System/Library/Frameworks/Tcl.framework/Headers -I/System/Library/Frameworks/Tk.framework/Headers -I/usr/local/include/freetype2 -IlibImaging -I/System/Library/Frameworks/Python.framework/Versions/2.7/include -I/usr/local/include -I/usr/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _imagingft.c -o build/temp.macosx-10.9-intel-2.7/_imagingft.o

clang: warning: argument unused during compilation: '-mno-fused-madd'

_imagingft.c:73:10: fatal error: 'freetype/fterrors.h' file not found

#include <freetype/fterrors.h>

         ^

1 error generated.

error: command 'cc' failed with exit status 1

----------------------------------------
Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/private/tmp/pip_build_root/PIL/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-vJHHeE-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /private/tmp/pip_build_root/PIL
Storing debug log for failure in /Users/aaronclaytondunn/Library/Logs/pip.log

And here's the requirements file ($NUPIC/external/common/requirements.txt):

#See http://www.pip-installer.org/en/latest/requirements.html for details
asteval==0.9.1
mock==1.0.1
ordereddict==1.1
PIL==1.1.7
psutil==1.0.1
pylint==0.28.0
pytest==2.4.2
pytest-cov==1.6
pytest-xdist==1.8
python-dateutil==2.1
PyYAML==3.10
unittest2==0.5.1
validictory==0.9.1
PyMySQL==0.5
DBUtils==1.1
numpy==1.7.1
tweepy==2.1

It was chugging along well for a while, so I assume it successfully installed some of the libraries and broke on one. Any ideas what's going wrong?

  • possible duplicate of [Error installing Python Image Library using pip on Mac OS X 10.9](http://stackoverflow.com/questions/20325473/error-installing-python-image-library-using-pip-on-mac-os-x-10-9) – jdigital Feb 18 '14 at 05:56

3 Answers3

1

The "Linked" question here Error installing Python Image Library using pip on Mac OS X 10.9 answers this issue (the top up-voted answer). Basically PIL doesn't install freetype headers properly any more. You need to link the new location to /usr/include/freetype.

Community
  • 1
  • 1
Fergal Byrne
  • 135
  • 4
  • Thanks! How do I find where the file's location is? The post you linked to is talking about upgrading to freetype2, but I think I'm running freetype. Should I be altering the heading? Or the path? – Aaron Clayton-Dunn Feb 19 '14 at 19:28
0
fterrors.h    

file was missed in your path. You can explicitely download and place this file in the appropriate directory.

Balayesu Chilakalapudi
  • 1,386
  • 3
  • 19
  • 43
0

You might need to install freetype.

brew install freetype
Matthew Taylor
  • 3,911
  • 4
  • 29
  • 33