New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSX: No package 'libffi' found #1888

Closed
stopspazzing opened this Issue Dec 14, 2015 · 2 comments

Comments

Projects
None yet
2 participants
@stopspazzing

stopspazzing commented Dec 14, 2015

Running El Capitan
Python 2.7.8

stopspasMacBook:letsencrypt stopspazzing$ pip install letsencrypt
Collecting letsencrypt
  Using cached letsencrypt-0.1.0-py2-none-any.whl
Collecting acme==0.1.0 (from letsencrypt)
  Using cached acme-0.1.0-py2-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): setuptools in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools-1.1.5-py2.7.egg (from letsencrypt)
Collecting python2-pythondialog>=3.2.2rc1 (from letsencrypt)
Collecting PyOpenSSL (from letsencrypt)
  Using cached pyOpenSSL-0.15.1-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): requests in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from letsencrypt)
Collecting parsedatetime (from letsencrypt)
  Using cached parsedatetime-1.5-py2-none-any.whl
Collecting configobj (from letsencrypt)
Requirement already satisfied (use --upgrade to upgrade): pytz in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from letsencrypt)
Collecting psutil>=2.1.0 (from letsencrypt)
Requirement already satisfied (use --upgrade to upgrade): six in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from letsencrypt)
Collecting cryptography>=0.7 (from letsencrypt)
  Using cached cryptography-1.1.2-cp27-none-macosx_10_6_intel.whl
Collecting zope.interface (from letsencrypt)
Collecting zope.component (from letsencrypt)
Collecting mock (from letsencrypt)
  Using cached mock-1.3.0-py2.py3-none-any.whl
Collecting ConfigArgParse (from letsencrypt)
Collecting pyrfc3339 (from letsencrypt)
  Using cached pyRFC3339-1.0-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): pyasn1 in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from acme==0.1.0->letsencrypt)
Collecting ndg-httpsclient (from acme==0.1.0->letsencrypt)
Collecting werkzeug (from acme==0.1.0->letsencrypt)
  Using cached Werkzeug-0.11.2-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): enum34 in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from cryptography>=0.7->letsencrypt)
Requirement already satisfied (use --upgrade to upgrade): ipaddress in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from cryptography>=0.7->letsencrypt)
Requirement already satisfied (use --upgrade to upgrade): idna>=2.0 in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from cryptography>=0.7->letsencrypt)
Collecting cffi>=1.1.0 (from cryptography>=0.7->letsencrypt)
  Using cached cffi-1.3.1.tar.gz
Collecting zope.event (from zope.component->letsencrypt)
Collecting funcsigs (from mock->letsencrypt)
  Using cached funcsigs-0.4-py2.py3-none-any.whl
Collecting pbr>=0.11 (from mock->letsencrypt)
  Using cached pbr-1.8.1-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): pycparser in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from cffi>=1.1.0->cryptography>=0.7->letsencrypt)
Installing collected packages: cffi, cryptography, PyOpenSSL, ndg-httpsclient, werkzeug, funcsigs, pbr, mock, pyrfc3339, acme, python2-pythondialog, parsedatetime, configobj, psutil, zope.interface, zope.event, zope.component, ConfigArgParse, letsencrypt
  Running setup.py install for cffi
    Complete output from command /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -c "import setuptools, tokenize;__file__='/private/var/folders/hd/tvgjfmwn0yj94_y60dhmz4200000gn/T/pip-build-4OBEfI/cffi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/hd/tvgjfmwn0yj94_y60dhmz4200000gn/T/pip-m1p9HW-record/install-record.txt --single-version-externally-managed --compile:
    Package libffi was not found in the pkg-config search path.
    Perhaps you should add the directory containing `libffi.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'libffi' found
    Package libffi was not found in the pkg-config search path.
    Perhaps you should add the directory containing `libffi.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'libffi' found
    Package libffi was not found in the pkg-config search path.
    Perhaps you should add the directory containing `libffi.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'libffi' found
    Package libffi was not found in the pkg-config search path.
    Perhaps you should add the directory containing `libffi.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'libffi' found
    Package libffi was not found in the pkg-config search path.
    Perhaps you should add the directory containing `libffi.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'libffi' found
    _configtest.c:1:1: error: thread-local storage is not supported for the current target
    __thread int some_threadlocal_variable_42;
    ^
    1 error generated.
    Note: will not use '__thread' in the C code
    The above error message can be safely ignored
    running install
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.6-intel-2.7
    creating build/lib.macosx-10.6-intel-2.7/cffi
    copying cffi/__init__.py -> build/lib.macosx-10.6-intel-2.7/cffi
    copying cffi/api.py -> build/lib.macosx-10.6-intel-2.7/cffi
    copying cffi/backend_ctypes.py -> build/lib.macosx-10.6-intel-2.7/cffi
    copying cffi/cffi_opcode.py -> build/lib.macosx-10.6-intel-2.7/cffi
    copying cffi/commontypes.py -> build/lib.macosx-10.6-intel-2.7/cffi
    copying cffi/cparser.py -> build/lib.macosx-10.6-intel-2.7/cffi
    copying cffi/ffiplatform.py -> build/lib.macosx-10.6-intel-2.7/cffi
    copying cffi/gc_weakref.py -> build/lib.macosx-10.6-intel-2.7/cffi
    copying cffi/lock.py -> build/lib.macosx-10.6-intel-2.7/cffi
    copying cffi/model.py -> build/lib.macosx-10.6-intel-2.7/cffi
    copying cffi/recompiler.py -> build/lib.macosx-10.6-intel-2.7/cffi
    copying cffi/setuptools_ext.py -> build/lib.macosx-10.6-intel-2.7/cffi
    copying cffi/vengine_cpy.py -> build/lib.macosx-10.6-intel-2.7/cffi
    copying cffi/vengine_gen.py -> build/lib.macosx-10.6-intel-2.7/cffi
    copying cffi/verifier.py -> build/lib.macosx-10.6-intel-2.7/cffi
    copying cffi/_cffi_include.h -> build/lib.macosx-10.6-intel-2.7/cffi
    copying cffi/parse_c_type.h -> build/lib.macosx-10.6-intel-2.7/cffi
    running build_ext
    building '_cffi_backend' extension
    creating build/temp.macosx-10.6-intel-2.7
    creating build/temp.macosx-10.6-intel-2.7/c
    /usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -arch i386 -arch x86_64 -g -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/include/ffi -I/usr/include/libffi -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c c/_cffi_backend.c -o build/temp.macosx-10.6-intel-2.7/c/_cffi_backend.o
    c/_cffi_backend.c:13:10: fatal error: 'ffi.h' file not found
    #include <ffi.h>
             ^
    1 error generated.
    error: command '/usr/bin/clang' failed with exit status 1

    ----------------------------------------
Command "/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -c "import setuptools, tokenize;__file__='/private/var/folders/hd/tvgjfmwn0yj94_y60dhmz4200000gn/T/pip-build-4OBEfI/cffi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/hd/tvgjfmwn0yj94_y60dhmz4200000gn/T/pip-m1p9HW-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/hd/tvgjfmwn0yj94_y60dhmz4200000gn/T/pip-build-4OBEfI/cffi
@reaperhulk

This comment has been minimized.

Show comment
Hide comment
@reaperhulk

reaperhulk Dec 14, 2015

Collaborator

This issue occurs when you don't have the Xcode command line tools properly installed (which provide /usr/include/ffi among many other headers). That said, it also uncovered a missing wheel set for cffi on OS X (for ABI 10_6+, which with current pip is required for any python.org pythons). I've generated and uploaded the missing wheels so it should work for you now.

Collaborator

reaperhulk commented Dec 14, 2015

This issue occurs when you don't have the Xcode command line tools properly installed (which provide /usr/include/ffi among many other headers). That said, it also uncovered a missing wheel set for cffi on OS X (for ABI 10_6+, which with current pip is required for any python.org pythons). I've generated and uploaded the missing wheels so it should work for you now.

@stopspazzing

This comment has been minimized.

Show comment
Hide comment
@stopspazzing

stopspazzing Dec 14, 2015

Yup that fixed it. Thanks!!

stopspazzing commented Dec 14, 2015

Yup that fixed it. Thanks!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment