Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/353.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 安装scrapy时出错_Python_Django_Scrapy - Fatal编程技术网

Python 安装scrapy时出错

Python 安装scrapy时出错,python,django,scrapy,Python,Django,Scrapy,我正在尝试安装scrapy,它会出现以下错误: Downloading/unpacking cryptography>=0.2.1 (from pyOpenSSL->Scrapy) Running setup.py egg_info for package cryptography Package libffi was not found in the pkg-config search path. Perhaps you should add the direc

我正在尝试安装scrapy,它会出现以下错误:

Downloading/unpacking cryptography>=0.2.1 (from pyOpenSSL->Scrapy)
  Running setup.py egg_info for package cryptography
    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
    c/_cffi_backend.c:13:17: fatal error: ffi.h: No such file or directory
    compilation terminated.
    Traceback (most recent call last):
      File "<string>", line 14, in <module>
      File "/home/nilesh/build/cryptography/setup.py", line 174, in <module>
        "test": PyTest,
      File "/usr/lib/python2.7/distutils/core.py", line 112, in setup
        _setup_distribution = dist = klass(attrs)
      File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 221, in __init__
        self.fetch_build_eggs(attrs.pop('setup_requires'))
      File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 245, in fetch_build_eggs
        parse_requirements(requires), installer=self.fetch_build_egg
      File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 576, in resolve
        dist = best[req.key] = env.best_match(req, self, installer)
      File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 821, in best_match
        return self.obtain(req, installer) # try and download/install
      File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 833, in obtain
        return installer(requirement)
      File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 294, in fetch_build_egg
        return cmd.easy_install(req)
      File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 608, in easy_install
        return self.install_item(spec, dist.location, tmpdir, deps)
      File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 638, in install_item
        dists = self.install_eggs(spec, download, tmpdir)
      File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 828, in install_eggs
        return self.build_and_install(setup_script, setup_base)
      File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 1105, in build_and_install
        self.run_setup(setup_script, setup_base, args)
      File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 1096, in run_setup
        raise DistutilsError("Setup script exited with %s" % (v.args[0],))
    distutils.errors.DistutilsError: Setup script exited with error: command 'gcc' failed with exit status 1
    Complete output from command python setup.py egg_info:
    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

c/_cffi_backend.c:13:17: fatal error: ffi.h: No such file or directory

compilation terminated.

Traceback (most recent call last):

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

  File "/home/nilesh/build/cryptography/setup.py", line 174, in <module>

    "test": PyTest,

  File "/usr/lib/python2.7/distutils/core.py", line 112, in setup

    _setup_distribution = dist = klass(attrs)

  File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 221, in __init__

    self.fetch_build_eggs(attrs.pop('setup_requires'))

  File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 245, in fetch_build_eggs

    parse_requirements(requires), installer=self.fetch_build_egg

  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 576, in resolve

    dist = best[req.key] = env.best_match(req, self, installer)

  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 821, in best_match

    return self.obtain(req, installer) # try and download/install

  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 833, in obtain

    return installer(requirement)

  File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 294, in fetch_build_egg

    return cmd.easy_install(req)

  File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 608, in easy_install

    return self.install_item(spec, dist.location, tmpdir, deps)

  File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 638, in install_item

    dists = self.install_eggs(spec, download, tmpdir)

  File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 828, in install_eggs

    return self.build_and_install(setup_script, setup_base)

  File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 1105, in build_and_install

    self.run_setup(setup_script, setup_base, args)

  File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 1096, in run_setup

    raise DistutilsError("Setup script exited with %s" % (v.args[0],))

distutils.errors.DistutilsError: Setup script exited with error: command 'gcc' failed with exit status 1
下载/解包加密>=0.2.1(来自pyOpenSSL->Scrapy)
正在为包加密运行setup.py egg\u info
在pkg配置搜索路径中未找到包libffi。
也许您应该添加包含“libffi.pc”的目录
到PKG_CONFIG_PATH环境变量
找不到包“libffi”
在pkg配置搜索路径中未找到包libffi。
也许您应该添加包含“libffi.pc”的目录
到PKG_CONFIG_PATH环境变量
找不到包“libffi”
在pkg配置搜索路径中未找到包libffi。
也许您应该添加包含'libffi.pc'的目录
到PKG_CONFIG_PATH环境变量
找不到包“libffi”
在pkg配置搜索路径中未找到包libffi。
也许您应该添加包含“libffi.pc”的目录
到PKG_CONFIG_PATH环境变量
找不到包“libffi”
在pkg配置搜索路径中未找到包libffi。
也许您应该添加包含“libffi.pc”的目录
到PKG_CONFIG_PATH环境变量
找不到包“libffi”
c/_cffi_backend.c:13:17:致命错误:ffi.h:没有这样的文件或目录
编译终止。
回溯(最近一次呼叫最后一次):
文件“”,第14行,在
文件“/home/nilesh/build/cryptography/setup.py”,第174行,在
“测试”:PyTest,
文件“/usr/lib/python2.7/distutils/core.py”,第112行,在安装程序中
_设置\u分布=dist=klass(属性)
文件“/usr/lib/python2.7/dist-packages/setuptools/dist.py”,第221行,在__
self.fetch\u build\u鸡蛋(attrs.pop('setup\u requires'))
文件“/usr/lib/python2.7/dist packages/setuptools/dist.py”,第245行,在fetch\u build\u中
解析需求(requires),安装程序=self.fetch\u build\u
文件“/usr/lib/python2.7/dist packages/pkg_resources.py”,第576行,解析
dist=最佳[req.key]=环境最佳匹配(req,self,installer)
文件“/usr/lib/python2.7/dist packages/pkg_resources.py”,第821行,最佳匹配
返回self.acquire(请求,安装程序)#尝试下载/安装
文件“/usr/lib/python2.7/dist packages/pkg_resources.py”,第833行,在获取中
返回安装程序(要求)
文件“/usr/lib/python2.7/dist packages/setuptools/dist.py”,第294行,在fetch\u build\u egg中
return cmd.easy_安装(需要)
文件“/usr/lib/python2.7/dist-packages/setuptools/command/easy\u-install.py”,第608行,在easy\u-install中
返回自安装项目(规格、距离位置、tmpdir、deps)
文件“/usr/lib/python2.7/dist-packages/setuptools/command/easy\u install.py”,第638行,在安装项中
dists=self.install_-eggs(规范、下载、tmpdir)
文件“/usr/lib/python2.7/dist packages/setuptools/command/easy_install.py”,第828行,在install_中
返回self.build\u和安装(安装程序脚本、安装程序库)
文件“/usr/lib/python2.7/dist-packages/setuptools/command/easy\u-install.py”,第1105行,内置和安装
self.run\u安装程序(安装程序脚本、安装程序库、参数)
文件“/usr/lib/python2.7/dist packages/setuptools/command/easy\u install.py”,第1096行,在run\u安装程序中
raise DistutilsError(“安装程序脚本退出时带有%s”%(v.args[0],))
distutils.errors.DistutilsError:安装程序脚本退出,出现错误:命令“gcc”失败,退出状态为1
从命令python setup.py egg_info完成输出:
在pkg配置搜索路径中未找到包libffi。
也许您应该添加包含“libffi.pc”的目录
到PKG_CONFIG_PATH环境变量
找不到包“libffi”
在pkg配置搜索路径中未找到包libffi。
也许您应该添加包含“libffi.pc”的目录
到PKG_CONFIG_PATH环境变量
找不到包“libffi”
在pkg配置搜索路径中未找到包libffi。
也许您应该添加包含“libffi.pc”的目录
到PKG_CONFIG_PATH环境变量
找不到包“libffi”
在pkg配置搜索路径中未找到包libffi。
也许您应该添加包含“libffi.pc”的目录
到PKG_CONFIG_PATH环境变量
找不到包“libffi”
在pkg配置搜索路径中未找到包libffi。
也许您应该添加包含“libffi.pc”的目录
到PKG_CONFIG_PATH环境变量
找不到包“libffi”
c/_cffi_backend.c:13:17:致命错误:ffi.h:没有这样的文件或目录
编译终止。
回溯(最近一次呼叫最后一次):
文件“”,第14行,在
文件“/home/nilesh/build/cryptography/setup.py”,第174行,在
“测试”:PyTest,
文件“/usr/lib/python2.7/distutils/core.py”,第112行,在安装程序中
_设置\u分布=dist=klass(属性)
文件“/usr/lib/python2.7/dist-packages/setuptools/dist.py”,第221行,在__
self.fetch\u build\u鸡蛋(attrs.pop('setup\u requires'))
文件“/usr/lib/python2.7/dist packages/setuptools/dist.py”,第245行,在fetch\u build\u中
解析需求(requires),安装程序=self.fetch\u build\u
文件“/usr/lib/python2.7/dist packages/pkg_resources.py”,第576行,解析
dist=最佳[req.key]=环境最佳匹配(req,self,installer)
文件“/usr/lib/python2.7/dist packages/pkg_resources.py”,第821行,最佳匹配
返回self.acquire(请求,安装程序)#尝试下载/安装
文件“/usr/lib/python2.7/dist packages/pkg_resources.py”,第833行,在获取中
返回安装程序(要求)
文件“/usr/lib/python2.7/dist packages/setuptools/dist.py”,第294行,在fetch\u build\u egg中
return cmd.easy_安装(需要)
文件“/usr/lib/python2.7/dist-packages/setuptools/command/easy\u-install.py”,第608行,在easy\u-install中
返回自安装项目(规格、距离位置、tmpdir、deps)
文件“/usr/lib/python2.7/dist-packages/setuptools/command/easy\u install.py”,第638行,在安装项中
dists=self.install_-eggs(规范,下载,tm
sudo apt-get install  libffi-dev