在pip install`unicode`错误中安装加密失败

时间:2014-09-11 05:31:12

标签: python linux install pip

我正在尝试安装cryptography,但失败时出现unicode错误。

[root@localhost root]$ pip install "cryptography>=0.2.1"
Downloading/unpacking cryptography>=0.2.1
  Downloading cryptography-0.5.4.tar.gz (320kB): 320kB downloaded
  Running setup.py (path:/home/nileshkumar-govindbhai.patel/workspaces/gozer/horizon/.venv/build/cryptography/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: error: ffi.h: No such file or directory
    In file included from c/_cffi_backend.c:43:
    c/malloc_closure.h:33: error: expected specifier-qualifier-list before âffi_closureâ
    c/malloc_closure.h: In function âmore_coreâ:
    c/malloc_closure.h:69: warning: division by zero
    c/malloc_closure.h:96: error: âunion mmaped_blockâ has no member named ânextâ
    c/malloc_closure.h: At top level:
    c/malloc_closure.h:105: error: expected â)â before â*â token
    c/malloc_closure.h:113: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before â*â token
    c/_cffi_backend.c:209: error: expected specifier-qualifier-list before âffi_cifâ
    c/_cffi_backend.c: In function âcdataowninggc_deallocâ:
    c/_cffi_backend.c:1521: error: âffi_closureâ undeclared (first use in this function)
    c/_cffi_backend.c:1521: error: (Each undeclared identifier is reported only once
    c/_cffi_backend.c:1521: error: for each function it appears in.)
    c/_cffi_backend.c:1521: error: âclosureâ undeclared (first use in this function)
    c/_cffi_backend.c:1521: error: expected expression before â)â token
    c/_cffi_backend.c:1524: warning: implicit declaration of function âcffi_closure_freeâ
    c/_cffi_backend.c: In function âcdataowninggc_traverseâ:
    c/_cffi_backend.c:1536: error: âffi_closureâ undeclared (first use in this function)
    c/_cffi_backend.c:1536: error: âclosureâ undeclared (first use in this function)
    c/_cffi_backend.c:1536: error: expected expression before â)â token
    c/_cffi_backend.c: In function âcdataowninggc_clearâ:
    c/_cffi_backend.c:1552: error: âffi_closureâ undeclared (first use in this function)
    c/_cffi_backend.c:1552: error: âclosureâ undeclared (first use in this function)
    c/_cffi_backend.c:1552: error: expected expression before â)â token
    c/_cffi_backend.c: In function âcdataowning_reprâ:
    c/_cffi_backend.c:1676: error: âffi_closureâ undeclared (first use in this function)
    c/_cffi_backend.c:1676: error: expected expression before â)â token
    c/_cffi_backend.c: At top level:
    c/_cffi_backend.c:2222: error: expected declaration specifiers or â...â before âffi_abiâ
    c/_cffi_backend.c: In function âcdata_callâ:
    c/_cffi_backend.c:2356: error: âffi_abiâ undeclared (first use in this function)
    c/_cffi_backend.c:2356: error: expected â;â before âfabiâ
    c/_cffi_backend.c:2398: error: âfabiâ undeclared (first use in this function)
    c/_cffi_backend.c:2402: error: too many arguments to function âfb_prepare_cifâ
    c/_cffi_backend.c:2407: error: âcif_description_tâ has no member named âexchange_sizeâ
    c/_cffi_backend.c:2417: error: âcif_description_tâ has no member named âexchange_offset_argâ
    c/_cffi_backend.c:2447: error: âcif_description_tâ has no member named âexchange_offset_argâ
    c/_cffi_backend.c:2452: warning: implicit declaration of function âffi_callâ
    c/_cffi_backend.c:2452: error: âcif_description_tâ has no member named âcifâ
    c/_cffi_backend.c: In function âb_new_primitive_typeâ:
    c/_cffi_backend.c:3356: error: âffi_typeâ undeclared (first use in this function)
    c/_cffi_backend.c:3356: error: âffitypeâ undeclared (first use in this function)
    c/_cffi_backend.c:3377: error: âffi_type_sint8â undeclared (first use in this function)
    c/_cffi_backend.c:3378: error: âffi_type_sint16â undeclared (first use in this function)
    c/_cffi_backend.c:3379: error: âffi_type_sint32â undeclared (first use in this function)
    c/_cffi_backend.c:3380: error: âffi_type_sint64â undeclared (first use in this function)
    c/_cffi_backend.c:3386: error: âffi_type_floatâ undeclared (first use in this function)
    c/_cffi_backend.c:3388: error: âffi_type_doubleâ undeclared (first use in this function)
    c/_cffi_backend.c:3390: error: âffi_type_longdoubleâ undeclared (first use in this function)
    c/_cffi_backend.c:3396: error: âffi_type_uint8â undeclared (first use in this function)
    c/_cffi_backend.c:3397: error: âffi_type_uint16â undeclared (first use in this function)
    c/_cffi_backend.c:3398: error: âffi_type_uint32â undeclared (first use in this function)
    c/_cffi_backend.c:3399: error: âffi_type_uint64â undeclared (first use in this function)
    c/_cffi_backend.c: At top level:
    c/_cffi_backend.c:3953: error: expected specifier-qualifier-list before âffi_typeâ
    c/_cffi_backend.c:3972: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before â*â token
    c/_cffi_backend.c: In function âfb_buildâ:
    c/_cffi_backend.c:4103: error: âstruct funcbuilder_sâ has no member named âatypesâ
    c/_cffi_backend.c:4103: error: âffi_typeâ undeclared (first use in this function)
    c/_cffi_backend.c:4103: error: expected expression before â)â token
    c/_cffi_backend.c:4104: error: âstruct funcbuilder_sâ has no member named ânargsâ
    c/_cffi_backend.c:4107: error: âstruct funcbuilder_sâ has no member named ârtypeâ
    c/_cffi_backend.c:4107: warning: implicit declaration of function âfb_fill_typeâ
    c/_cffi_backend.c:4115: error: âcif_description_tâ has no member named âexchange_offset_argâ
    c/_cffi_backend.c:4118: error: âstruct funcbuilder_sâ has no member named ârtypeâ
    c/_cffi_backend.c:4119: error: âffi_argâ undeclared (first use in this function)
    c/_cffi_backend.c:4129: error: âatypeâ undeclared (first use in this function)
    c/_cffi_backend.c:4142: error: âstruct funcbuilder_sâ has no member named âatypesâ
    c/_cffi_backend.c:4143: error: âstruct funcbuilder_sâ has no member named âatypesâ
    c/_cffi_backend.c:4146: error: âcif_description_tâ has no member named âexchange_offset_argâ
    c/_cffi_backend.c:4153: error: âcif_description_tâ has no member named âexchange_sizeâ
    c/_cffi_backend.c: In function âfb_build_nameâ:
    c/_cffi_backend.c:4175: error: âstruct funcbuilder_sâ has no member named ânargsâ
    c/_cffi_backend.c:4184: error: âstruct funcbuilder_sâ has no member named âfctâ
    c/_cffi_backend.c:4186: error: âstruct funcbuilder_sâ has no member named âfctâ
    c/_cffi_backend.c: In function âfb_prepare_ctypeâ:
    c/_cffi_backend.c:4227: error: âstruct funcbuilder_sâ has no member named âfctâ
    c/_cffi_backend.c:4237: error: âstruct funcbuilder_sâ has no member named âfctâ
    c/_cffi_backend.c: At top level:
    c/_cffi_backend.c:4257: error: expected declaration specifiers or â...â before âffi_abiâ
    c/_cffi_backend.c: In function âfb_prepare_cifâ:
    c/_cffi_backend.c:4284: warning: implicit declaration of function âffi_prep_cifâ
    c/_cffi_backend.c:4284: error: âcif_description_tâ has no member named âcifâ
    c/_cffi_backend.c:4284: error: âfabiâ undeclared (first use in this function)
    c/_cffi_backend.c:4284: error: âstruct funcbuilder_sâ has no member named ânargsâ
    c/_cffi_backend.c:4285: error: âstruct funcbuilder_sâ has no member named ârtypeâ
    c/_cffi_backend.c:4285: error: âstruct funcbuilder_sâ has no member named âatypesâ
    c/_cffi_backend.c:4285: error: âFFI_OKâ undeclared (first use in this function)
    c/_cffi_backend.c: In function âb_new_function_typeâ:
    c/_cffi_backend.c:4302: error: âFFI_DEFAULT_ABIâ undeclared (first use in this function)
    c/_cffi_backend.c:4340: error: too many arguments to function âfb_prepare_cifâ
    c/_cffi_backend.c:4348: error: âstruct funcbuilder_sâ has no member named ânargsâ
    c/_cffi_backend.c:4358: error: âstruct funcbuilder_sâ has no member named ânargsâ
    c/_cffi_backend.c: In function âconvert_from_object_fficallbackâ:
    c/_cffi_backend.c:4382: error: âffi_argâ undeclared (first use in this function)
    c/_cffi_backend.c: At top level:
    c/_cffi_backend.c:4454: error: expected â)â before â*â token
    c/_cffi_backend.c: In function âb_callbackâ:
    c/_cffi_backend.c:4525: error: âffi_closureâ undeclared (first use in this function)
    c/_cffi_backend.c:4525: error: âclosureâ undeclared (first use in this function)
    c/_cffi_backend.c:4546: error: âffi_argâ undeclared (first use in this function)
    c/_cffi_backend.c:4564: warning: implicit declaration of function âcffi_closure_allocâ
    c/_cffi_backend.c:4581: warning: implicit declaration of function âffi_prep_closureâ
    c/_cffi_backend.c:4581: error: âcif_description_tâ has no member named âcifâ
    c/_cffi_backend.c:4582: error: âinvoke_callbackâ undeclared (first use in this function)
    c/_cffi_backend.c:4582: error: âFFI_OKâ undeclared (first use in this function)
    c/_cffi_backend.c: In function âinit_cffi_backendâ:
    c/_cffi_backend.c:5511: error: âFFI_DEFAULT_ABIâ undeclared (first use in this function)
    compiling '_configtest.c':
    __thread int some_threadlocal_variable_42;
    Traceback (most recent call last):
      File "<string>", line 17, in <module>
      File "/home/nileshkumar-govindbhai.patel/workspaces/gozer/horizon/.venv/build/cryptography/setup.py", line 174, in <module>
        "test": PyTest,
      File "/usr/lib64/python2.6/distutils/core.py", line 113, in setup
        _setup_distribution = dist = klass(attrs)
      File "/home/nileshkumar-govindbhai.patel/workspaces/gozer/horizon/.venv/lib/python2.6/site-packages/setuptools/dist.py", line 262, in __init__
        self.fetch_build_eggs(attrs['setup_requires'])
      File "/home/nileshkumar-govindbhai.patel/workspaces/gozer/horizon/.venv/lib/python2.6/site-packages/setuptools/dist.py", line 287, in fetch_build_eggs
        replace_conflicting=True,
      File "/home/nileshkumar-govindbhai.patel/workspaces/gozer/horizon/.venv/lib/python2.6/site-packages/pkg_resources.py", line 631, in resolve
        dist = best[req.key] = env.best_match(req, ws, installer)
      File "/home/nileshkumar-govindbhai.patel/workspaces/gozer/horizon/.venv/lib/python2.6/site-packages/pkg_resources.py", line 874, in best_match
        return self.obtain(req, installer)
      File "/home/nileshkumar-govindbhai.patel/workspaces/gozer/horizon/.venv/lib/python2.6/site-packages/pkg_resources.py", line 886, in obtain
        return installer(requirement)
      File "/home/nileshkumar-govindbhai.patel/workspaces/gozer/horizon/.venv/lib/python2.6/site-packages/setuptools/dist.py", line 338, in fetch_build_egg
        return cmd.easy_install(req)
      File "/home/nileshkumar-govindbhai.patel/workspaces/gozer/horizon/.venv/lib/python2.6/site-packages/setuptools/command/easy_install.py", line 613, in easy_install
        return self.install_item(spec, dist.location, tmpdir, deps)
      File "/home/nileshkumar-govindbhai.patel/workspaces/gozer/horizon/.venv/lib/python2.6/site-packages/setuptools/command/easy_install.py", line 643, in install_item
        dists = self.install_eggs(spec, download, tmpdir)
      File "/home/nileshkumar-govindbhai.patel/workspaces/gozer/horizon/.venv/lib/python2.6/site-packages/setuptools/command/easy_install.py", line 833, in install_eggs
        return self.build_and_install(setup_script, setup_base)
      File "/home/nileshkumar-govindbhai.patel/workspaces/gozer/horizon/.venv/lib/python2.6/site-packages/setuptools/command/easy_install.py", line 1055, in build_and_install
        self.run_setup(setup_script, setup_base, args)
      File "/home/nileshkumar-govindbhai.patel/workspaces/gozer/horizon/.venv/lib/python2.6/site-packages/setuptools/command/easy_install.py", line 1043, 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: error: ffi.h: No such file or directory

In file included from c/_cffi_backend.c:43:

c/malloc_closure.h:33: error: expected specifier-qualifier-list before âffi_closureâ

c/malloc_closure.h: In function âmore_coreâ:

c/malloc_closure.h:69: warning: division by zero

c/malloc_closure.h:96: error: âunion mmaped_blockâ has no member named ânextâ

c/malloc_closure.h: At top level:

c/malloc_closure.h:105: error: expected â)â before â*â token

c/malloc_closure.h:113: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before â*â token

c/_cffi_backend.c:209: error: expected specifier-qualifier-list before âffi_cifâ

c/_cffi_backend.c: In function âcdataowninggc_deallocâ:

c/_cffi_backend.c:1521: error: âffi_closureâ undeclared (first use in this function)

c/_cffi_backend.c:1521: error: (Each undeclared identifier is reported only once

c/_cffi_backend.c:1521: error: for each function it appears in.)

c/_cffi_backend.c:1521: error: âclosureâ undeclared (first use in this function)

c/_cffi_backend.c:1521: error: expected expression before â)â token

c/_cffi_backend.c:1524: warning: implicit declaration of function âcffi_closure_freeâ

c/_cffi_backend.c: In function âcdataowninggc_traverseâ:

c/_cffi_backend.c:1536: error: âffi_closureâ undeclared (first use in this function)

c/_cffi_backend.c:1536: error: âclosureâ undeclared (first use in this function)

c/_cffi_backend.c:1536: error: expected expression before â)â token

c/_cffi_backend.c: In function âcdataowninggc_clearâ:

c/_cffi_backend.c:1552: error: âffi_closureâ undeclared (first use in this function)

c/_cffi_backend.c:1552: error: âclosureâ undeclared (first use in this function)

c/_cffi_backend.c:1552: error: expected expression before â)â token

c/_cffi_backend.c: In function âcdataowning_reprâ:

c/_cffi_backend.c:1676: error: âffi_closureâ undeclared (first use in this function)

c/_cffi_backend.c:1676: error: expected expression before â)â token

c/_cffi_backend.c: At top level:

c/_cffi_backend.c:2222: error: expected declaration specifiers or â...â before âffi_abiâ

c/_cffi_backend.c: In function âcdata_callâ:

c/_cffi_backend.c:2356: error: âffi_abiâ undeclared (first use in this function)

c/_cffi_backend.c:2356: error: expected â;â before âfabiâ

c/_cffi_backend.c:2398: error: âfabiâ undeclared (first use in this function)

c/_cffi_backend.c:2402: error: too many arguments to function âfb_prepare_cifâ

c/_cffi_backend.c:2407: error: âcif_description_tâ has no member named âexchange_sizeâ

c/_cffi_backend.c:2417: error: âcif_description_tâ has no member named âexchange_offset_argâ

c/_cffi_backend.c:2447: error: âcif_description_tâ has no member named âexchange_offset_argâ

c/_cffi_backend.c:2452: warning: implicit declaration of function âffi_callâ

c/_cffi_backend.c:2452: error: âcif_description_tâ has no member named âcifâ

c/_cffi_backend.c: In function âb_new_primitive_typeâ:

c/_cffi_backend.c:3356: error: âffi_typeâ undeclared (first use in this function)

c/_cffi_backend.c:3356: error: âffitypeâ undeclared (first use in this function)

c/_cffi_backend.c:3377: error: âffi_type_sint8â undeclared (first use in this function)

c/_cffi_backend.c:3378: error: âffi_type_sint16â undeclared (first use in this function)

c/_cffi_backend.c:3379: error: âffi_type_sint32â undeclared (first use in this function)

c/_cffi_backend.c:3380: error: âffi_type_sint64â undeclared (first use in this function)

c/_cffi_backend.c:3386: error: âffi_type_floatâ undeclared (first use in this function)

c/_cffi_backend.c:3388: error: âffi_type_doubleâ undeclared (first use in this function)

c/_cffi_backend.c:3390: error: âffi_type_longdoubleâ undeclared (first use in this function)

c/_cffi_backend.c:3396: error: âffi_type_uint8â undeclared (first use in this function)

c/_cffi_backend.c:3397: error: âffi_type_uint16â undeclared (first use in this function)

c/_cffi_backend.c:3398: error: âffi_type_uint32â undeclared (first use in this function)

c/_cffi_backend.c:3399: error: âffi_type_uint64â undeclared (first use in this function)

c/_cffi_backend.c: At top level:

c/_cffi_backend.c:3953: error: expected specifier-qualifier-list before âffi_typeâ

c/_cffi_backend.c:3972: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before â*â token

c/_cffi_backend.c: In function âfb_buildâ:

c/_cffi_backend.c:4103: error: âstruct funcbuilder_sâ has no member named âatypesâ

c/_cffi_backend.c:4103: error: âffi_typeâ undeclared (first use in this function)

c/_cffi_backend.c:4103: error: expected expression before â)â token

c/_cffi_backend.c:4104: error: âstruct funcbuilder_sâ has no member named ânargsâ

c/_cffi_backend.c:4107: error: âstruct funcbuilder_sâ has no member named ârtypeâ

c/_cffi_backend.c:4107: warning: implicit declaration of function âfb_fill_typeâ

c/_cffi_backend.c:4115: error: âcif_description_tâ has no member named âexchange_offset_argâ

c/_cffi_backend.c:4118: error: âstruct funcbuilder_sâ has no member named ârtypeâ

c/_cffi_backend.c:4119: error: âffi_argâ undeclared (first use in this function)

c/_cffi_backend.c:4129: error: âatypeâ undeclared (first use in this function)

c/_cffi_backend.c:4142: error: âstruct funcbuilder_sâ has no member named âatypesâ

c/_cffi_backend.c:4143: error: âstruct funcbuilder_sâ has no member named âatypesâ

c/_cffi_backend.c:4146: error: âcif_description_tâ has no member named âexchange_offset_argâ

c/_cffi_backend.c:4153: error: âcif_description_tâ has no member named âexchange_sizeâ

c/_cffi_backend.c: In function âfb_build_nameâ:

c/_cffi_backend.c:4175: error: âstruct funcbuilder_sâ has no member named ânargsâ

c/_cffi_backend.c:4184: error: âstruct funcbuilder_sâ has no member named âfctâ

c/_cffi_backend.c:4186: error: âstruct funcbuilder_sâ has no member named âfctâ

c/_cffi_backend.c: In function âfb_prepare_ctypeâ:

c/_cffi_backend.c:4227: error: âstruct funcbuilder_sâ has no member named âfctâ

c/_cffi_backend.c:4237: error: âstruct funcbuilder_sâ has no member named âfctâ

c/_cffi_backend.c: At top level:

c/_cffi_backend.c:4257: error: expected declaration specifiers or â...â before âffi_abiâ

c/_cffi_backend.c: In function âfb_prepare_cifâ:

c/_cffi_backend.c:4284: warning: implicit declaration of function âffi_prep_cifâ

c/_cffi_backend.c:4284: error: âcif_description_tâ has no member named âcifâ

c/_cffi_backend.c:4284: error: âfabiâ undeclared (first use in this function)

c/_cffi_backend.c:4284: error: âstruct funcbuilder_sâ has no member named ânargsâ

c/_cffi_backend.c:4285: error: âstruct funcbuilder_sâ has no member named ârtypeâ

c/_cffi_backend.c:4285: error: âstruct funcbuilder_sâ has no member named âatypesâ

c/_cffi_backend.c:4285: error: âFFI_OKâ undeclared (first use in this function)

c/_cffi_backend.c: In function âb_new_function_typeâ:

c/_cffi_backend.c:4302: error: âFFI_DEFAULT_ABIâ undeclared (first use in this function)

c/_cffi_backend.c:4340: error: too many arguments to function âfb_prepare_cifâ

c/_cffi_backend.c:4348: error: âstruct funcbuilder_sâ has no member named ânargsâ

c/_cffi_backend.c:4358: error: âstruct funcbuilder_sâ has no member named ânargsâ

c/_cffi_backend.c: In function âconvert_from_object_fficallbackâ:

c/_cffi_backend.c:4382: error: âffi_argâ undeclared (first use in this function)

c/_cffi_backend.c: At top level:

c/_cffi_backend.c:4454: error: expected â)â before â*â token

c/_cffi_backend.c: In function âb_callbackâ:

c/_cffi_backend.c:4525: error: âffi_closureâ undeclared (first use in this function)

c/_cffi_backend.c:4525: error: âclosureâ undeclared (first use in this function)

c/_cffi_backend.c:4546: error: âffi_argâ undeclared (first use in this function)

c/_cffi_backend.c:4564: warning: implicit declaration of function âcffi_closure_allocâ

c/_cffi_backend.c:4581: warning: implicit declaration of function âffi_prep_closureâ

c/_cffi_backend.c:4581: error: âcif_description_tâ has no member named âcifâ

c/_cffi_backend.c:4582: error: âinvoke_callbackâ undeclared (first use in this function)

c/_cffi_backend.c:4582: error: âFFI_OKâ undeclared (first use in this function)

c/_cffi_backend.c: In function âinit_cffi_backendâ:

c/_cffi_backend.c:5511: error: âFFI_DEFAULT_ABIâ undeclared (first use in this function)

compiling '_configtest.c':

__thread int some_threadlocal_variable_42;

Traceback (most recent call last):

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

  File "/home/nileshkumar-govindbhai.patel/workspaces/gozer/horizon/.venv/build/cryptography/setup.py", line 174, in <module>

    "test": PyTest,

  File "/usr/lib64/python2.6/distutils/core.py", line 113, in setup

    _setup_distribution = dist = klass(attrs)

  File "/home/nileshkumar-govindbhai.patel/workspaces/gozer/horizon/.venv/lib/python2.6/site-packages/setuptools/dist.py", line 262, in __init__

    self.fetch_build_eggs(attrs['setup_requires'])

  File "/home/nileshkumar-govindbhai.patel/workspaces/gozer/horizon/.venv/lib/python2.6/site-packages/setuptools/dist.py", line 287, in fetch_build_eggs

    replace_conflicting=True,

  File "/home/nileshkumar-govindbhai.patel/workspaces/gozer/horizon/.venv/lib/python2.6/site-packages/pkg_resources.py", line 631, in resolve

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

  File "/home/nileshkumar-govindbhai.patel/workspaces/gozer/horizon/.venv/lib/python2.6/site-packages/pkg_resources.py", line 874, in best_match

    return self.obtain(req, installer)

  File "/home/nileshkumar-govindbhai.patel/workspaces/gozer/horizon/.venv/lib/python2.6/site-packages/pkg_resources.py", line 886, in obtain

    return installer(requirement)

  File "/home/nileshkumar-govindbhai.patel/workspaces/gozer/horizon/.venv/lib/python2.6/site-packages/setuptools/dist.py", line 338, in fetch_build_egg

    return cmd.easy_install(req)

  File "/home/nileshkumar-govindbhai.patel/workspaces/gozer/horizon/.venv/lib/python2.6/site-packages/setuptools/command/easy_install.py", line 613, in easy_install

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

  File "/home/nileshkumar-govindbhai.patel/workspaces/gozer/horizon/.venv/lib/python2.6/site-packages/setuptools/command/easy_install.py", line 643, in install_item

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

  File "/home/nileshkumar-govindbhai.patel/workspaces/gozer/horizon/.venv/lib/python2.6/site-packages/setuptools/command/easy_install.py", line 833, in install_eggs

    return self.build_and_install(setup_script, setup_base)

  File "/home/nileshkumar-govindbhai.patel/workspaces/gozer/horizon/.venv/lib/python2.6/site-packages/setuptools/command/easy_install.py", line 1055, in build_and_install

    self.run_setup(setup_script, setup_base, args)

  File "/home/nileshkumar-govindbhai.patel/workspaces/gozer/horizon/.venv/lib/python2.6/site-packages/setuptools/command/easy_install.py", line 1043, 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

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /home/nileshkumar-govindbhai.patel/workspaces/gozer/horizon/.venv/build/cryptography
Traceback (most recent call last):
  File "/home/nileshkumar-govindbhai.patel/workspaces/gozer/horizon/.venv/bin/pip", line 8, in <module>
    load_entry_point('pip==1.5.6', 'console_scripts', 'pip')()
  File "/home/nileshkumar-govindbhai.patel/workspaces/gozer/horizon/.venv/lib/python2.6/site-packages/pip/__init__.py", line 185, in main
    return command.main(cmd_args)
  File "/home/nileshkumar-govindbhai.patel/workspaces/gozer/horizon/.venv/lib/python2.6/site-packages/pip/basecommand.py", line 161, in main
    text = '\n'.join(complete_log)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 75: ordinal not in range(128)

它给出了unicode错误:(

1 个答案:

答案 0 :(得分:4)

您的实际问题似乎是您没有安装libffi。您可以在设置步骤中看到数百条无法找到libffi的消息,并且在尝试包含ffi.h时出现C编译器错误,等等。所以,你需要做的就是安装它。

这是一个C库,而不是Python库。您的平台可能有一个包,可以使用yumaptbrewport或其他任何方式安装;如果没有,您可以下载并手动安装。 (IIRC,您可以./configure && make install,但请阅读文档。)在某些平台上,您可能还需要libffi-devellibffi-devlibffi-libs或类似的软件包。

此外,您没有libffi的事实也暗示您可能没有CPython开发文件(因为在大多数平台上,它们依赖于libffi),这意味着您和#39;一旦你越过这个问题就会遇到另一个问题。这些可能位于名为pythonpython-devel的单独包中(或者python27-devel或类似)。


那么,最后有UnicodeError的是什么?好吧,你的设置确实有些麻烦。在您的所有输出中,您会收到âmore_coreâ之类的内容,显然每个'打印为â。这有点像Latin-1和UTF-8 mojibake,但很难确定。

无论如何,在某些时候,Python正在尝试生成一些输出(很可能是实际异常的异常消息),其中包含â个字符(注意它正在抱怨{{1} }},0xe2'\xe2'.decode('latin-1'))。但它未能检测到您的终端,因此它尝试将字符串编码为ASCII,当然这会失败,因此它会引发u'â',这会隐藏真正的错误。 (这是2.x设计几乎不可能解决的事情之一,没有大量的hackery,但是很早就在3.x分支中修复了,并且从那时起进一步改进。不幸的是,你和#39;仍然使用2.7,所以这对你没有帮助。)