安装加密Mac OS时出错

时间:2015-05-11 06:21:37

标签: python macos ssl

我正在尝试在我的Mac上安装加密模块。

我收到以下错误(在日志的底部)...任何帮助表示赞赏。

Collecting cryptography
/Library/Python/2.7/site-packages/pip-6.1.1-py2.7.egg/pip/_vendor/requests/packages/urllib3/util/ssl_.py:79: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Using cached cryptography-0.8.2.tar.gz
Requirement already satisfied (use --upgrade to upgrade): pyasn1 in /Library/Python/2.7/site-packages (from cryptography)
Requirement already satisfied (use --upgrade to upgrade): six>=1.4.1 in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from cryptography)
Requirement already satisfied (use --upgrade to upgrade): setuptools in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from cryptography)
Requirement already satisfied (use --upgrade to upgrade): enum34 in /Library/Python/2.7/site-packages (from cryptography)
Collecting cffi>=0.8 (from cryptography)
  Using cached cffi-0.9.2.tar.gz
Requirement already satisfied (use --upgrade to upgrade): pycparser in /Library/Python/2.7/site-packages (from cffi>=0.8->cryptography)
Installing collected packages: cffi, cryptography
  Running setup.py install for cffi
    Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/private/var/folders/dr/0012sfx174j7mzd39njyty740000gn/T/pip-build-G1MDvc/cffi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/dr/0012sfx174j7mzd39njyty740000gn/T/pip-IZL3Pj-record/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.10-intel-2.7
    creating build/lib.macosx-10.10-intel-2.7/cffi
    copying cffi/__init__.py -> build/lib.macosx-10.10-intel-2.7/cffi
    copying cffi/api.py -> build/lib.macosx-10.10-intel-2.7/cffi
    copying cffi/backend_ctypes.py -> build/lib.macosx-10.10-intel-2.7/cffi
    copying cffi/commontypes.py -> build/lib.macosx-10.10-intel-2.7/cffi
    copying cffi/cparser.py -> build/lib.macosx-10.10-intel-2.7/cffi
    copying cffi/ffiplatform.py -> build/lib.macosx-10.10-intel-2.7/cffi
    copying cffi/gc_weakref.py -> build/lib.macosx-10.10-intel-2.7/cffi
    copying cffi/lock.py -> build/lib.macosx-10.10-intel-2.7/cffi
    copying cffi/model.py -> build/lib.macosx-10.10-intel-2.7/cffi
    copying cffi/vengine_cpy.py -> build/lib.macosx-10.10-intel-2.7/cffi
    copying cffi/vengine_gen.py -> build/lib.macosx-10.10-intel-2.7/cffi
    copying cffi/verifier.py -> build/lib.macosx-10.10-intel-2.7/cffi
    running build_ext
    building '_cffi_backend' extension
    creating build/temp.macosx-10.10-intel-2.7
    creating build/temp.macosx-10.10-intel-2.7/c
    cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -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 x86_64 -arch i386 -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.10-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 'cc' failed with exit status 1

----------------------------------------
Command "/usr/bin/python -c "import setuptools, tokenize;__file__='/private/var/folders/dr/0012sfx174j7mzd39njyty740000gn/T/pip-build-G1MDvc/cffi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/dr/0012sfx174j7mzd39njyty740000gn/T/pip-IZL3Pj-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/dr/0012sfx174j7mzd39njyty740000gn/T/pip-build-G1MDvc/cffi

mdfind ffi.h导致以下日志......

/usr/include/ffi/ffi.h /Users/gregdabelstein/Library/Caches/Metadata/Safari/History/http:%2F%2Fstackoverflow.com%2Fquestions%2F30160799%2Ferror-installing-cryptography-mac-os.webhistory /Users/gregdabelstein/Library/Caches/Metadata/Safari/History/http:%2F%2Fstackoverflow.com%2Fquestions%2F27740044%2Fpip-cffi-package-installation-falied-on-osx.webhistory /Users/gregdabelstein/Library/Caches/Metadata/Safari/History/http:%2F%2Fstackoverflow.com%2Fquestions%2F30160799%2Ferror-installing-cryptography-mac-os?noredirect=1%23comment48428590_30160799.webhistory /Users/gregdabelstein/Library/Containers/com.apple.Notes/Data/Library/CoreData/ExternalRecords/9ADD5BA3-4C33-4130-82C8-73A863C9305E/IMAPNote/_records/0/p39.notesexternalrecord /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/lang/gauche-c-wrapper/Portfile /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/devel/libffi/Portfile

0 个答案:

没有答案