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

Nilesh

我正在尝试安装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错误:(

阿巴内特

看来您的实际问题是您尚未libffi安装。您可以libffi在设置步骤中看到数百条有关无法找到的消息,以及试图包含C编译器错误ffi.h,等等。因此,您需要做的是安装它。

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

另外,您没有的事实libffi也意味着您可能没有CPython开发文件(因为在大多数平台上,它们依赖libffi),这意味着一旦您遇到了这个问题,您就会遇到另一个问题。这些名称可能与python命名的名称python-develpython27-devel或类似名称)放在单独的软件包中


那么,UnicodeError最后是什么?好吧,您的设置确实有些棘手。在所有输出中,您都会得到类似的东西âmore_coreâ,显然每个都以的形式'打印出来â闻起来像是Latin-1与UTF-8 mojibake,但是很难确定。

无论如何,Python有时会尝试生成一些包含â字符的输出(很可能是实际异常的异常消息)(请注意,它抱怨0xe2,并且'\xe2'.decode('latin-1')u'â')。但是它无法检测到您的终端,因此它尝试将字符串编码为ASCII,当然会失败,因此它会引发一个UnicodeError,从而掩盖了真正的错误。(这是在没有大量黑客攻击的情况下,用2.x设计几乎无法修复的事情之一,但该问题在3.x分支中很早就已修复,此后得到了进一步改进。不幸的是,您仍在使用2.7,因此对您无济于事。)

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

无法安装PIP密码学

来自分类Dev

在python 3中使用ASCII进行密码学

来自分类Dev

在 Windows 上安装 Python 的密码学

来自分类Dev

C#中的双转义序列和Rijndael管理的密码学

来自分类Dev

使用AES的Crypto.js和.NET密码学中的不同加密

来自分类Dev

密码学-可以在字节数组中刷一些位吗?

来自分类Dev

Android中的Java密码学标准库是否作为本机代码运行

来自分类Dev

Pip“ install”安装在Jython中,而不是python中

来自分类Dev

密码学

来自分类Dev

用于scipy的PIP安装在Ubuntu 14.04上严重失败

来自分类Dev

密码学-提交应用

来自分类Dev

密码学与散列

来自分类Dev

密码学代码混乱

来自分类Dev

为什么(miniconda)pip安装在.local中

来自分类Dev

pip3 只安装在我的环境中吗?

来自分类Dev

pip install pubnub抛出“ gcc”失败错误

来自分类Dev

pip install在OpenShift中失败,错误信息是“权限被拒绝”

来自分类Dev

pip install在OpenShift中失败,错误信息是“权限被拒绝”

来自分类Dev

在Cipher.getInstance(String algo)中使用的Java密码学中'AGCM256-KW'的算法字符串是什么?

来自分类Dev

在Cipher.getInstance(String algo)中使用的Java密码学中'AGCM256-KW'的算法字符串是什么?

来自分类Dev

协助公开密钥密码学

来自分类Dev

OSX上的密码学升级问题

来自分类Dev

密码学:在python中加密

来自分类Dev

这个密码学代码安全吗?

来自分类Dev

密码学-提交应用程序

来自分类Dev

用python进行密码学

来自分类Dev

python的多次安装,pip软件包安装在错误的目录窗口中

来自分类Dev

Docker安装在Linux中失败,错误为[Errno 14] HTTPS错误404-未找到

来自分类Dev

安装pip install xlwt时终端中的错误消息

Related 相关文章

热门标签

归档