Python 包装器安装给出 "Command "python setup.py egg_info“失败,错误代码 1”

Python wrapper install gives "Command "python setup.py egg_info" failed with error code 1"

过去两天我一直在尝试安装这个 Python 包装器。我在 Stack Overflow 上查看了所有其他问题。什么都试过了,似乎什么都不管用。

Processing /../../../../../wrappers/Python
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/private/tmp/pip-twPZdY-build/setup.py", line 50, in <module>
    **cffi_args
  File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 111, in setup
    _setup_distribution = dist = klass(attrs)
  File "/usr/local/lib/python2.7/site-packages/setuptools/dist.py", line 319, in __init__
    _Distribution.__init__(self, attrs)
  File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 287, in __init__
    self.finalize_options()
  File "/usr/local/lib/python2.7/site-packages/setuptools/dist.py", line 386, in finalize_options
    ep.load()(self, ep.name, value)
  File "/private/tmp/pip-twPZdY-build/.eggs/cffi-1.10.0-py2.7-macosx-10.11-x86_64.egg/cffi/setuptools_ext.py", line 188, in cffi_modules
    add_cffi_module(dist, cffi_module)
  File "/private/tmp/pip-twPZdY-build/.eggs/cffi-1.10.0-py2.7-macosx-10.11-x86_64.egg/cffi/setuptools_ext.py", line 49, in add_cffi_module
    execfile(build_file_name, mod_vars)
  File "/private/tmp/pip-twPZdY-build/.eggs/cffi-1.10.0-py2.7-macosx-10.11-x86_64.egg/cffi/setuptools_ext.py", line 25, in execfile
    exec(code, glob, glob)
  File "../ffi_build.py", line 34, in <module>
    ffi.set_source('../_ffi', None)
  File "/private/tmp/pip-twPZdY-build/.eggs/cffi-1.10.0-py2.7-macosx-10.11-x86_64.egg/cffi/api.py", line 612, in set_source
    raise ValueError("'module_name' must not contain '/': use a dotted "
ValueError: 'module_name' must not contain '/': use a dotted name to make a 'package.module' location

----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/tmp/pip-twPZdY-build/

我至少重新安装了两次,更新了,尝试了 sudo -H,但似乎没有任何效果。似乎是setuptools的问题,但我不知道如何解决它。

仔细阅读错误消息后,我设法在我尝试绑定的 Python 文件夹下找到了名为 ffi_build.py 的文件。如错误消息中所述,在第 34 行有一个包含“/”的模块命名语句。通过用 '.' 替换那个 '/'我解决了这个问题并成功地绑定了 Python 包装器,没有任何问题。