Python 安装刮屑器清洗失败

Python 安装刮屑器清洗失败,python,macos,python-2.7,installation,scrapy,Python,Macos,Python 2.7,Installation,Scrapy,我一直在尝试使用pip安装Scrapy,以便为本赛季制定NBA时间表和得分。在过去的6个小时里,我一直在努力安装它。我已经一字不差地遵循了设置说明,但仍然无法使其正常工作。任何帮助都将不胜感激。终端窗口输出如下所示。非常感谢!使用mac osx btw Requirement already satisfied (use --upgrade to upgrade): Scrapy in /Library/Frameworks/Python.framework/Versions/2.7/lib/p

我一直在尝试使用pip安装
Scrapy
,以便为本赛季制定NBA时间表和得分。在过去的6个小时里,我一直在努力安装它。我已经一字不差地遵循了设置说明,但仍然无法使其正常工作。任何帮助都将不胜感激。终端窗口输出如下所示。非常感谢!使用mac osx btw

Requirement already satisfied (use --upgrade to upgrade): Scrapy in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Scrapy-0.22.2-py2.7.egg
Downloading/unpacking Twisted>=10.0.0 (from Scrapy)
  Downloading Twisted-13.2.0.tar.bz2 (2.7MB): 2.7MB downloaded
  Running setup.py (path:/private/var/folders/22/642hcs8n6sx5xg59phv8rw2c0000gn/T/pip_build_andrew/Twisted/setup.py) egg_info for package Twisted

Downloading/unpacking w3lib>=1.2 (from Scrapy)
  Downloading w3lib-1.5.tar.gz
  Running setup.py (path:/private/var/folders/22/642hcs8n6sx5xg59phv8rw2c0000gn/T/pip_build_andrew/w3lib/setup.py) egg_info for package w3lib

Downloading/unpacking queuelib (from Scrapy)
  Downloading queuelib-1.1.1.tar.gz
  Running setup.py (path:/private/var/folders/22/642hcs8n6sx5xg59phv8rw2c0000gn/T/pip_build_andrew/queuelib/setup.py) egg_info for package queuelib

Downloading/unpacking lxml (from Scrapy)
  Downloading lxml-3.3.5.tar.gz (3.5MB): 3.5MB downloaded
  Running setup.py (path:/private/var/folders/22/642hcs8n6sx5xg59phv8rw2c0000gn/T/pip_build_andrew/lxml/setup.py) egg_info for package lxml
    /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url'
      warnings.warn(msg)
    Building lxml version 3.3.5.
    Building without Cython.
    Using build configuration of libxslt 1.1.28

    warning: no previously-included files found matching '*.py'
Requirement already satisfied (use --upgrade to upgrade): pyOpenSSL in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pyOpenSSL-0.14-py2.7.egg (from Scrapy)
Requirement already satisfied (use --upgrade to upgrade): cssselect>=0.9 in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/cssselect-0.9.1-py2.7.egg (from Scrapy)
Requirement already satisfied (use --upgrade to upgrade): six>=1.5.2 in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/six-1.6.1-py2.7.egg (from Scrapy)
Downloading/unpacking zope.interface>=3.6.0 (from Twisted>=10.0.0->Scrapy)
  Downloading zope.interface-4.1.1.tar.gz (864kB): 864kB downloaded
  Running setup.py (path:/private/var/folders/22/642hcs8n6sx5xg59phv8rw2c0000gn/T/pip_build_andrew/zope.interface/setup.py) egg_info for package zope.interface

    warning: no previously-included files matching '*.dll' found anywhere in distribution
    warning: no previously-included files matching '*.pyc' found anywhere in distribution
    warning: no previously-included files matching '*.pyo' found anywhere in distribution
    warning: no previously-included files matching '*.so' found anywhere in distribution
Downloading/unpacking cryptography>=0.2.1 (from pyOpenSSL->Scrapy)
  Downloading cryptography-0.3.tar.gz (208kB): 208kB downloaded
  Running setup.py (path:/private/var/folders/22/642hcs8n6sx5xg59phv8rw2c0000gn/T/pip_build_andrew/cryptography/setup.py) egg_info for package cryptography
    OS/X: confusion between 'cc' versus 'gcc' (see issue 123)
    will not use '__thread' in the C code
    c/_cffi_backend.c:14:10: fatal error: 'ffi.h' file not found
    #include <ffi.h>
             ^
    1 error generated.
    Traceback (most recent call last):
      File "<string>", line 17, in <module>
      File "/private/var/folders/22/642hcs8n6sx5xg59phv8rw2c0000gn/T/pip_build_andrew/cryptography/setup.py", line 156, in <module>
        "test": PyTest,
      File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 112, in setup
        _setup_distribution = dist = klass(attrs)
      File "build/bdist.macosx-10.6-intel/egg/setuptools/dist.py", line 239, in __init__
      File "build/bdist.macosx-10.6-intel/egg/setuptools/dist.py", line 264, in fetch_build_eggs
      File "build/bdist.macosx-10.6-intel/egg/pkg_resources.py", line 620, in resolve
      File "build/bdist.macosx-10.6-intel/egg/pkg_resources.py", line 858, in best_match
      File "build/bdist.macosx-10.6-intel/egg/pkg_resources.py", line 870, in obtain
      File "build/bdist.macosx-10.6-intel/egg/setuptools/dist.py", line 314, in fetch_build_egg
      File "build/bdist.macosx-10.6-intel/egg/setuptools/command/easy_install.py", line 593, in easy_install
      File "build/bdist.macosx-10.6-intel/egg/setuptools/command/easy_install.py", line 623, in install_item
      File "build/bdist.macosx-10.6-intel/egg/setuptools/command/easy_install.py", line 811, in install_eggs
      File "build/bdist.macosx-10.6-intel/egg/setuptools/command/easy_install.py", line 1017, in build_and_install
      File "build/bdist.macosx-10.6-intel/egg/setuptools/command/easy_install.py", line 1005, in run_setup
    distutils.errors.DistutilsError: Setup script exited with error: command '/usr/bin/clang' failed with exit status 1
    Complete output from command python setup.py egg_info:
    OS/X: confusion between 'cc' versus 'gcc' (see issue 123)

will not use '__thread' in the C code

c/_cffi_backend.c:14:10: fatal error: 'ffi.h' file not found

#include <ffi.h>

         ^

1 error generated.

Traceback (most recent call last):

  File "<string>", line 17, in <module>

  File "/private/var/folders/22/642hcs8n6sx5xg59phv8rw2c0000gn/T/pip_build_andrew/cryptography/setup.py", line 156, in <module>

    "test": PyTest,

  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 112, in setup

    _setup_distribution = dist = klass(attrs)

  File "build/bdist.macosx-10.6-intel/egg/setuptools/dist.py", line 239, in __init__

  File "build/bdist.macosx-10.6-intel/egg/setuptools/dist.py", line 264, in fetch_build_eggs

  File "build/bdist.macosx-10.6-intel/egg/pkg_resources.py", line 620, in resolve

  File "build/bdist.macosx-10.6-intel/egg/pkg_resources.py", line 858, in best_match

  File "build/bdist.macosx-10.6-intel/egg/pkg_resources.py", line 870, in obtain

  File "build/bdist.macosx-10.6-intel/egg/setuptools/dist.py", line 314, in fetch_build_egg

  File "build/bdist.macosx-10.6-intel/egg/setuptools/command/easy_install.py", line 593, in easy_install

  File "build/bdist.macosx-10.6-intel/egg/setuptools/command/easy_install.py", line 623, in install_item

  File "build/bdist.macosx-10.6-intel/egg/setuptools/command/easy_install.py", line 811, in install_eggs

  File "build/bdist.macosx-10.6-intel/egg/setuptools/command/easy_install.py", line 1017, in build_and_install

  File "build/bdist.macosx-10.6-intel/egg/setuptools/command/easy_install.py", line 1005, in run_setup

distutils.errors.DistutilsError: Setup script exited with error: command '/usr/bin/clang' failed with exit status 1

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /private/var/folders/22/642hcs8n6sx5xg59phv8rw2c0000gn/T/pip_build_andrew/cryptography
Storing debug log for failure in /Users/andrew/.pip/pip.log
已满足要求(使用--upgrade进行升级):Scrapy in/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Scrapy-0.22.2-py2.7.egg
下载/解包Twisted>=10.0.0(来自Scrapy)
下载Twisted-13.2.0.tar.bz2(2.7MB):下载2.7MB
运行setup.py(路径:/private/var/folders/22/642hcs8n6sx5xg59phv8rw2c0000gn/T/pip\u build\u andrew/Twisted/setup.py)包Twisted的egg\u信息
下载/解包w3lib>=1.2(来自Scrapy)
下载w3lib-1.5.tar.gz
运行setup.py(路径:/private/var/folders/22/642hcs8n6sx5xg59phv8rw2c0000gn/T/pip\u build\u andrew/w3lib/setup.py)包w3lib的egg\u信息
下载/解包queuelib(从Scrapy)
正在下载queuelib-1.1.1.tar.gz
运行setup.py(路径:/private/var/folders/22/642hcs8n6sx5xg59phv8rw2c0000gn/T/pip\u build\u andrew/queuelib/setup.py)包queuelib的egg\u信息
下载/解包lxml(来自Scrapy)
下载lxml-3.3.5.tar.gz(3.5MB):下载3.5MB
运行setup.py(路径:/private/var/folders/22/642hcs8n6sx5xg59phv8rw2c0000gn/T/pip\u build\u andrew/lxml/setup.py)包lxml的egg\u信息
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267:UserWarning:未知的分发选项:“bugtrack\u url”
警告。警告(msg)
构建lxml版本3.3.5。
没有赛昂的建筑。
使用libxslt 1.1.28的构建配置
警告:未找到与“*.py”匹配的以前包含的文件
已满足要求(使用--升级以升级):pyOpenSSL in/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pyOpenSSL-0.14-py2.7.egg(来自Scrapy)
已满足要求(使用--升级升级):cssselect>=0.9 in/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/cssselect-0.9.1-py2.7.egg(来自Scrapy)
已满足要求(使用--升级到升级):six>=1.5.2 in/Library/Frameworks/Python.Frameworks/Versions/2.7/lib/python2.7/site-packages/six-1.6.1-py2.7.egg(来自Scrapy)
下载/解包zope.interface>=3.6.0(从Twisted>=10.0.0->Scrapy)
下载zope.interface-4.1.1.tar.gz(864kB):下载864kB
运行setup.py(路径:/private/var/folders/22/642hcs8n6sx5xg59phv8rw2c0000gn/T/pip\u build\u andrew/zope.interface/setup.py)包zope.interface的egg\u信息
警告:在发行版中找不到以前包含的与“*.dll”匹配的文件
警告:在发行版中找不到以前包含的与“*.pyc”匹配的文件
警告:在发行版中找不到以前包含的与“*.pyo”匹配的文件
警告:在发行版中找不到以前包含的与“*.so”匹配的文件
下载/解包加密>=0.2.1(从pyOpenSSL->Scrapy)
下载加密-0.3.tar.gz(208kB):下载208kB
运行setup.py(路径:/private/var/folders/22/642hcs8n6sx5xg59phv8rw2c0000gn/T/pip\u build\u andrew/cryptography/setup.py)包加密的egg\u信息
OS/X:“cc”与“gcc”之间的混淆(见第123期)
不会在C代码中使用“\uu线程”
c/_cffi_backend.c:14:10:致命错误:未找到“ffi.h”文件
#包括
^
生成1个错误。
回溯(最近一次呼叫最后一次):
文件“”,第17行,在
文件“/private/var/folders/22/642hcs8n6sx5xg59phv8rw2c0000gn/T/pip\u build\u andrew/cryptography/setup.py”,第156行,在
“测试”:PyTest,
文件“/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py”,第112行,在安装程序中
_设置\u分布=dist=klass(属性)
文件“build/bdist.macosx-10.6-intel/egg/setuptools/dist.py”,第239行,in__init__
文件“build/bdist.macosx-10.6-intel/egg/setuptools/dist.py”,第264行,在fetch\u build\u eggs中
文件“build/bdist.macosx-10.6-intel/egg/pkg_resources.py”,第620行,分辨率为
文件“build/bdist.macosx-10.6-intel/egg/pkg_resources.py”,第858行,最佳匹配
文件“build/bdist.macosx-10.6-intel/egg/pkg_resources.py”,第870行,获取
文件“build/bdist.macosx-10.6-intel/egg/setuptools/dist.py”,第314行,在fetch\u build\u egg中
文件“build/bdist.macosx-10.6-intel/egg/setuptools/command/easy_install.py”,第593行,在easy_install中
文件“build/bdist.macosx-10.6-intel/egg/setuptools/command/easy_install.py”,第623行,在安装项中
文件“build/bdist.macosx-10.6-intel/egg/setuptools/command/easy_install.py”,第811行,在install_egs中
文件“build/bdist.macosx-10.6-intel/egg/setuptools/command/easy_install.py”,第1017行,在build_和_install中
文件“build/bdist.macosx-10.6-intel/egg/setuptools/command/easy_install.py”,第1005行,在run_安装程序中
distutils.errors.DistutilsError:安装程序脚本退出,出现错误:命令“/usr/bin/clang”失败,退出状态为1
从命令python setup.py egg_info完成输出:
OS/X:“cc”与“gcc”之间的混淆(见第123期)
不会在C代码中使用“\uu线程”
c/_cffi_backend.c:14:10:致命错误:未找到“ffi.h”文件
#包括
^
生成1个错误。
回溯(最近一次呼叫最后一次):
文件“”,第17行,在
文件“/private/var/folders/22/642hcs8n6sx5xg59phv8rw2c0000gn/T/pip\u build\u andrew/cryptography/setup.py”,第156行,在
“测试”:PyTest,
文件“/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py”,第112行,在安装程序中
_设置\u分布=dist=klass(属性)
文件“build/bdist.macosx-10.6-intel/egg/setuptools/dist.py”,第239行,in__init__
文件“build/bdist.macosx-10.6-intel/egg/setuptoo
pip uninstall scrapy
pip install cryptography
pip install scrapy
brew install pkg-config libffi
export CFLAGS=-Qunused-arguments
export CPPFLAGS=-Qunused-arguments
export PKG_CONFIG_PATH=/usr/local/Cellar/libffi/3.0.13/lib/pkgconfig/
pip install cryptography
xcode-select --install
pip install Scrapy
easy_install Scrapy