Skip to content

Instantly share code, notes, and snippets.

@lenards
Created July 16, 2016 15:10
Show Gist options
  • Save lenards/98a7adb3fc5d1c161187515b1b221079 to your computer and use it in GitHub Desktop.
Save lenards/98a7adb3fc5d1c161187515b1b221079 to your computer and use it in GitHub Desktop.
clank and life developing on the mac ....
  Running setup.py install for cffi
    Complete output from command /Users/lenards/devel/clank/clank_env/bin/python -c "import setuptools, tokenize;__file__='/private/var/folders/wq/sbrbzrzs5mz0rk7gjtgtg6kc0000gn/T/pip-build-PZ100z/cffi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/wq/sbrbzrzs5mz0rk7gjtgtg6kc0000gn/T/pip-uyj0Ln-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/lenards/devel/clank/clank_env/include/site/python2.7/cffi:
    running install
    running build
    running build_py
    running build_ext
    building '_cffi_backend' extension
    cc -fno-strict-aliasing -fno-common -dynamic -arch i386 -arch x86_64 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -DUSE__THREAD -I/usr/include/ffi -I/usr/include/libffi -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c c/_cffi_backend.c -o build/temp.macosx-10.11-intel-2.7/c/_cffi_backend.o
    c/_cffi_backend.c:15:10: fatal error: 'ffi.h' file not found
    #include <ffi.h>
             ^
    1 error generated.
    error: command 'cc' failed with exit status 1
    
    ----------------------------------------
Command "/Users/lenards/devel/clank/clank_env/bin/python -c "import setuptools, tokenize;__file__='/private/var/folders/wq/sbrbzrzs5mz0rk7gjtgtg6kc0000gn/T/pip-build-PZ100z/cffi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/wq/sbrbzrzs5mz0rk7gjtgtg6kc0000gn/T/pip-uyj0Ln-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/lenards/devel/clank/clank_env/include/site/python2.7/cffi" failed with error code 1 in /private/var/folders/wq/sbrbzrzs5mz0rk7gjtgtg6kc0000gn/T/pip-build-PZ100z/cffi

http://stackoverflow.com/questions/22073516/failed-to-install-python-cryptography-package-with-pip-and-setup-py

08:05 $ brew install pkg-config libffi openssl
Warning: openssl-1.0.2h_1 already installed
==> Downloading https://homebrew.bintray.com/bottles/pkg-config-0.29.1.el_capitan.bottle.tar.gz
######################################################################## 100.0%
==> Pouring pkg-config-0.29.1.el_capitan.bottle.tar.gz
🍺  /usr/local/Cellar/pkg-config/0.29.1: 10 files, 627.2K
==> Downloading https://homebrew.bintray.com/bottles/libffi-3.0.13.el_capitan.bottle.tar.gz
######################################################################## 100.0%
==> Pouring libffi-3.0.13.el_capitan.bottle.tar.gz
==> Caveats
This formula is keg-only, which means it was not symlinked into /usr/local.

Some formulae require a newer version of libffi.

Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:

    LDFLAGS:  -L/usr/local/opt/libffi/lib

==> Summary
🍺  /usr/local/Cellar/libffi/3.0.13: 15 files, 374.6K
08:06 $ pip install --upgrade pip 
Collecting pip
  Using cached pip-8.1.2-py2.py3-none-any.whl
Installing collected packages: pip
  Found existing installation: pip 7.1.2
    Uninstalling pip-7.1.2:
      Successfully uninstalled pip-7.1.2
Successfully installed pip-8.1.2
(clank_env) βœ” ~/devel/clank [enable-new-relic L|βœ”] 
08:09 $ env LDFLAGS="-L$(brew --prefix openssl)/lib" CFLAGS="-I$(brew --prefix openssl)/include" pip install cryptography
Collecting cryptography
  Downloading cryptography-1.4-cp27-cp27m-macosx_10_10_intel.whl (2.4MB)
    100% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 2.4MB 500kB/s 
Collecting cffi>=1.4.1 (from cryptography)
  Downloading cffi-1.7.0-cp27-cp27m-macosx_10_10_intel.whl (212kB)
    100% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 215kB 2.3MB/s 
Requirement already satisfied (use --upgrade to upgrade): pyasn1>=0.1.8 in ./clank_env/lib/python2.7/site-packages (from cryptography)
Requirement already satisfied (use --upgrade to upgrade): setuptools>=11.3 in ./clank_env/lib/python2.7/site-packages (from cryptography)
Requirement already satisfied (use --upgrade to upgrade): six>=1.4.1 in ./clank_env/lib/python2.7/site-packages (from cryptography)
Requirement already satisfied (use --upgrade to upgrade): idna>=2.0 in ./clank_env/lib/python2.7/site-packages (from cryptography)
Requirement already satisfied (use --upgrade to upgrade): ipaddress in ./clank_env/lib/python2.7/site-packages (from cryptography)
Requirement already satisfied (use --upgrade to upgrade): enum34 in ./clank_env/lib/python2.7/site-packages (from cryptography)
Requirement already satisfied (use --upgrade to upgrade): pycparser in ./clank_env/lib/python2.7/site-packages (from cffi>=1.4.1->cryptography)
Installing collected packages: cffi, cryptography
Successfully installed cffi-1.7.0 cryptography-1.4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment