problems installing other packages with python 3.7 if cffi isn't already installed

Issue #367 resolved
ilove zfs
created an issue

I'm seeing this with multiple packages where the pip install fails if cffi wasn't already installed.

For example

(v) bash-3.2$ pip3 install --no-deps --no-binary :all: --ignore-installed brotlipy
Collecting brotlipy
  Using cached https://files.pythonhosted.org/packages/d9/91/bc79b88590e4f662bd40a55a2b6beb0f15da4726732efec5aa5a3763d856/brotlipy-0.7.0.tar.gz
    Complete output from command python setup.py egg_info:
    warning: no previously-included files matching 'yacctab.*' found under directory 'tests'
    warning: no previously-included files matching 'lextab.*' found under directory 'tests'
    warning: no previously-included files matching 'yacctab.*' found under directory 'examples'
    warning: no previously-included files matching 'lextab.*' found under directory 'examples'
    zip_safe flag not set; analyzing archive contents...
    pycparser.ply.__pycache__.lex.cpython-37: module references __file__
    pycparser.ply.__pycache__.lex.cpython-37: module MAY be using inspect.getsourcefile
    pycparser.ply.__pycache__.yacc.cpython-37: module references __file__
    pycparser.ply.__pycache__.yacc.cpython-37: module MAY be using inspect.getsourcefile
    pycparser.ply.__pycache__.yacc.cpython-37: module MAY be using inspect.stack
    pycparser.ply.__pycache__.ygen.cpython-37: module references __file__

    Installed /private/var/folders/w6/9r0nb9011glb8fdz__srd78c0000gq/T/pip-install-02oqr6zq/brotlipy/.eggs/pycparser-2.18-py3.7.egg
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/w6/9r0nb9011glb8fdz__srd78c0000gq/T/pip-install-02oqr6zq/brotlipy/setup.py", line 83, in <module>
        "Programming Language :: Python :: 3.6",
      File "/Users/joe/Developer/brotlipy-venv/v/lib/python3.7/site-packages/setuptools/__init__.py", line 129, in setup
        return distutils.core.setup(**attrs)
      File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/core.py", line 108, in setup
        _setup_distribution = dist = klass(attrs)
      File "/Users/joe/Developer/brotlipy-venv/v/lib/python3.7/site-packages/setuptools/dist.py", line 370, in __init__
        k: v for k, v in attrs.items()
      File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 292, in __init__
        self.finalize_options()
      File "/Users/joe/Developer/brotlipy-venv/v/lib/python3.7/site-packages/setuptools/dist.py", line 529, in finalize_options
        ep.load()(self, ep.name, value)
      File "/private/var/folders/w6/9r0nb9011glb8fdz__srd78c0000gq/T/pip-install-02oqr6zq/brotlipy/.eggs/cffi-1.11.5-py3.7-macosx-10.11-x86_64.egg/cffi/setuptools_ext.py", line 204, in cffi_modules
        add_cffi_module(dist, cffi_module)
      File "/private/var/folders/w6/9r0nb9011glb8fdz__srd78c0000gq/T/pip-install-02oqr6zq/brotlipy/.eggs/cffi-1.11.5-py3.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/var/folders/w6/9r0nb9011glb8fdz__srd78c0000gq/T/pip-install-02oqr6zq/brotlipy/.eggs/cffi-1.11.5-py3.7-macosx-10.11-x86_64.egg/cffi/setuptools_ext.py", line 25, in execfile
        exec(code, glob, glob)
      File "src/brotli/build.py", line 5, in <module>
        ffi = FFI()
      File "/private/var/folders/w6/9r0nb9011glb8fdz__srd78c0000gq/T/pip-install-02oqr6zq/brotlipy/.eggs/cffi-1.11.5-py3.7-macosx-10.11-x86_64.egg/cffi/api.py", line 46, in __init__
        import _cffi_backend as backend
    ImportError: dlopen(/private/var/folders/w6/9r0nb9011glb8fdz__srd78c0000gq/T/pip-install-02oqr6zq/brotlipy/.eggs/cffi-1.11.5-py3.7-macosx-10.11-x86_64.egg/_cffi_backend.so, 2): Symbol not found: __PyThreadState_Current
      Referenced from: /private/var/folders/w6/9r0nb9011glb8fdz__srd78c0000gq/T/pip-install-02oqr6zq/brotlipy/.eggs/cffi-1.11.5-py3.7-macosx-10.11-x86_64.egg/_cffi_backend.so
      Expected in: flat namespace
     in /private/var/folders/w6/9r0nb9011glb8fdz__srd78c0000gq/T/pip-install-02oqr6zq/brotlipy/.eggs/cffi-1.11.5-py3.7-macosx-10.11-x86_64.egg/_cffi_backend.so

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/w6/9r0nb9011glb8fdz__srd78c0000gq/T/pip-install-02oqr6zq/brotlipy/
(v) bash-3.2$ 

Comments (34)

  1. ilove zfs reporter

    Ditto bcrypt:

    (v) bash-3.2$ pip3 install --no-deps --no-binary :all: --ignore-installed bcrypt
    Collecting bcrypt
      Using cached https://files.pythonhosted.org/packages/f3/ec/bb6b384b5134fd881b91b6aa3a88ccddaad0103857760711a5ab8c799358/bcrypt-3.1.4.tar.gz
    Skipping bdist_wheel for bcrypt, due to binaries being disabled for it.
    Installing collected packages: bcrypt
      Running setup.py install for bcrypt ... error
        Complete output from command /Users/joe/Developer/brotlipy-venv/v/bin/python3.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/w6/9r0nb9011glb8fdz__srd78c0000gq/T/pip-install-e1cczxf2/bcrypt/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/w6/9r0nb9011glb8fdz__srd78c0000gq/T/pip-record-gsg3yphh/install-record.txt --single-version-externally-managed --compile --install-headers /Users/joe/Developer/brotlipy-venv/v/bin/../include/site/python3.7/bcrypt:
        warning: no previously-included files matching 'yacctab.*' found under directory 'tests'
        warning: no previously-included files matching 'lextab.*' found under directory 'tests'
        warning: no previously-included files matching 'yacctab.*' found under directory 'examples'
        warning: no previously-included files matching 'lextab.*' found under directory 'examples'
        zip_safe flag not set; analyzing archive contents...
        pycparser.ply.__pycache__.lex.cpython-37: module references __file__
        pycparser.ply.__pycache__.lex.cpython-37: module MAY be using inspect.getsourcefile
        pycparser.ply.__pycache__.yacc.cpython-37: module references __file__
        pycparser.ply.__pycache__.yacc.cpython-37: module MAY be using inspect.getsourcefile
        pycparser.ply.__pycache__.yacc.cpython-37: module MAY be using inspect.stack
        pycparser.ply.__pycache__.ygen.cpython-37: module references __file__
    
        Installed /private/var/folders/w6/9r0nb9011glb8fdz__srd78c0000gq/T/pip-install-e1cczxf2/bcrypt/.eggs/pycparser-2.18-py3.7.egg
        Traceback (most recent call last):
          File "<string>", line 1, in <module>
          File "/private/var/folders/w6/9r0nb9011glb8fdz__srd78c0000gq/T/pip-install-e1cczxf2/bcrypt/setup.py", line 238, in <module>
            **keywords_with_side_effects(sys.argv)
          File "/Users/joe/Developer/brotlipy-venv/v/lib/python3.7/site-packages/setuptools/__init__.py", line 129, in setup
            return distutils.core.setup(**attrs)
          File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/core.py", line 108, in setup
            _setup_distribution = dist = klass(attrs)
          File "/Users/joe/Developer/brotlipy-venv/v/lib/python3.7/site-packages/setuptools/dist.py", line 370, in __init__
            k: v for k, v in attrs.items()
          File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 292, in __init__
            self.finalize_options()
          File "/Users/joe/Developer/brotlipy-venv/v/lib/python3.7/site-packages/setuptools/dist.py", line 529, in finalize_options
            ep.load()(self, ep.name, value)
          File "/private/var/folders/w6/9r0nb9011glb8fdz__srd78c0000gq/T/pip-install-e1cczxf2/bcrypt/.eggs/cffi-1.11.5-py3.7-macosx-10.11-x86_64.egg/cffi/setuptools_ext.py", line 204, in cffi_modules
            add_cffi_module(dist, cffi_module)
          File "/private/var/folders/w6/9r0nb9011glb8fdz__srd78c0000gq/T/pip-install-e1cczxf2/bcrypt/.eggs/cffi-1.11.5-py3.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/var/folders/w6/9r0nb9011glb8fdz__srd78c0000gq/T/pip-install-e1cczxf2/bcrypt/.eggs/cffi-1.11.5-py3.7-macosx-10.11-x86_64.egg/cffi/setuptools_ext.py", line 25, in execfile
            exec(code, glob, glob)
          File "src/build_bcrypt.py", line 21, in <module>
            ffi = FFI()
          File "/private/var/folders/w6/9r0nb9011glb8fdz__srd78c0000gq/T/pip-install-e1cczxf2/bcrypt/.eggs/cffi-1.11.5-py3.7-macosx-10.11-x86_64.egg/cffi/api.py", line 46, in __init__
            import _cffi_backend as backend
        ImportError: dlopen(/private/var/folders/w6/9r0nb9011glb8fdz__srd78c0000gq/T/pip-install-e1cczxf2/bcrypt/.eggs/cffi-1.11.5-py3.7-macosx-10.11-x86_64.egg/_cffi_backend.so, 2): Symbol not found: __PyThreadState_Current
          Referenced from: /private/var/folders/w6/9r0nb9011glb8fdz__srd78c0000gq/T/pip-install-e1cczxf2/bcrypt/.eggs/cffi-1.11.5-py3.7-macosx-10.11-x86_64.egg/_cffi_backend.so
          Expected in: flat namespace
         in /private/var/folders/w6/9r0nb9011glb8fdz__srd78c0000gq/T/pip-install-e1cczxf2/bcrypt/.eggs/cffi-1.11.5-py3.7-macosx-10.11-x86_64.egg/_cffi_backend.so
    
        ----------------------------------------
    Command "/Users/joe/Developer/brotlipy-venv/v/bin/python3.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/w6/9r0nb9011glb8fdz__srd78c0000gq/T/pip-install-e1cczxf2/bcrypt/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/w6/9r0nb9011glb8fdz__srd78c0000gq/T/pip-record-gsg3yphh/install-record.txt --single-version-externally-managed --compile --install-headers /Users/joe/Developer/brotlipy-venv/v/bin/../include/site/python3.7/bcrypt" failed with error code 1 in /private/var/folders/w6/9r0nb9011glb8fdz__srd78c0000gq/T/pip-install-e1cczxf2/bcrypt/
    (v) bash-3.2$ 
    
  2. Armin Rigo

    Works for me: entering the pip commands in a virtualenv with CPython 3.7.0 succeeds here.

    The problem might come from a confusion between versions. It seems you get an error about _PyThreadState_Current, but this symbol should not be used on CPython >= 3.6. In other words, it looks like the _cffi_backend.so file used was compiled for CPython 3.5.x or older. I have no idea why that would be the case. Maybe it is miscompiled inside the MacOSX version of cffi 1.11.5 for 3.7. Can you check that directly?

    (As an aside, I don't understand why it is called just _cffi_backend.so. On Linux it is called _cffi_backend.cpython-37m-x86_64-linux-gnu.so.)

  3. ilove zfs reporter

    Maybe it is miscompiled inside the MacOSX version of cffi 1.11.5 for 3.7. Can you check that directly?

    Can you elaborate exactly what/which files/what commands you'd like me to check?

  4. ilove zfs reporter
    bash-3.2$ virtualenv -ppython3 v
    Running virtualenv with interpreter /usr/local/bin/python3
    Using base prefix '/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7'
    /usr/local/lib/python3.7/site-packages/virtualenv.py:1041: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
      import imp
    New python executable in /Users/joe/Developer/cffitests/v/bin/python3.7
    Also creating executable in /Users/joe/Developer/cffitests/v/bin/python
    Installing setuptools, pip, wheel...done.
    bash-3.2$ . v/bin/activate
    (v) bash-3.2$ pip3 install cffi
    Collecting cffi
      Using cached https://files.pythonhosted.org/packages/0b/ba/32835c9965d8a0090723e1d0b47373365525c4bd08c807b5efdc9fecbc99/cffi-1.11.5-cp37-cp37m-macosx_10_9_x86_64.whl
    Collecting pycparser (from cffi)
    Installing collected packages: pycparser, cffi
    Successfully installed cffi-1.11.5 pycparser-2.18
    (v) bash-3.2$ python3
    Python 3.7.0 (default, Jun 29 2018, 20:13:13) 
    [Clang 9.1.0 (clang-902.0.39.2)] on darwin
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import cffi
    >>> 
    
  5. Armin Rigo

    Sorry! Just import cffi won't actually import _cffi_backend. You need this:

    pip3 install cffi
    python3
    [...3.7.0...]
    >>> import _cffi_backend
    

    If it works, try with other arguments to pip3, maybe --no-binary :all:

  6. Armin Rigo

    Some more confusion: your first paste includes the text cffi-1.11.5-py3.7-macosx-10.11-x86_64.egg. But your later paste says cffi-1.11.5-cp37-cp37m-macosx_10_9_x86_64.whl. I have no clue why the OSX version (10.9 versus 10.11) doesn't match. That doesn't look like the same source. But we don't know, because pip apparently doesn't say where it gets the dependency cffi from, if it's just a dependency (or maybe a build-time dependency, like here).

  7. ilove zfs reporter

    OK I think the problem file is https://files.pythonhosted.org/packages/15/5b/fe99b63da21831415c9b60467704cd0f96180e9d4c2d96eba424d63bebcb/cffi-1.11.5-cp34-abi3-macosx_10_6_intel.whl

    bash-3.2$ mkdir easyinstall
    bash-3.2$ cd easyinstall/
    bash-3.2$ virtualenv -ppython3 v
    Running virtualenv with interpreter /usr/local/bin/python3
    Using base prefix '/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7'
    /usr/local/lib/python3.7/site-packages/virtualenv.py:1041: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
      import imp
    New python executable in /Users/joe/Developer/easyinstall/v/bin/python3.7
    Also creating executable in /Users/joe/Developer/easyinstall/v/bin/python
    Installing setuptools, pip, wheel...done.
    bash-3.2$ . v/bin/activate
    (v) bash-3.2$ which easy_install
    /Users/joe/Developer/easyinstall/v/bin/easy_install
    (v) bash-3.2$ python3
    Python 3.7.0 (default, Jun 29 2018, 20:13:13) 
    [Clang 9.1.0 (clang-902.0.39.2)] on darwin
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import cffi
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    ModuleNotFoundError: No module named 'cffi'
    >>> 
    (v) bash-3.2$ easy_install cffi
    Searching for cffi
    Reading https://pypi.org/simple/cffi/
    Downloading https://files.pythonhosted.org/packages/15/5b/fe99b63da21831415c9b60467704cd0f96180e9d4c2d96eba424d63bebcb/cffi-1.11.5-cp34-abi3-macosx_10_6_intel.whl#sha256=facc52ea162864a51556925bfa09d8c8c131349aeabfce2da4a43198e36fba5c
    Best match: cffi 1.11.5
    Processing cffi-1.11.5-cp34-abi3-macosx_10_6_intel.whl
    Installing cffi-1.11.5-cp34-abi3-macosx_10_6_intel.whl to /Users/joe/Developer/easyinstall/v/lib/python3.7/site-packages
    writing requirements to /Users/joe/Developer/easyinstall/v/lib/python3.7/site-packages/cffi-1.11.5-py3.7-macosx-10.13-x86_64.egg/EGG-INFO/requires.txt
    Adding cffi 1.11.5 to easy-install.pth file
    
    Installed /Users/joe/Developer/easyinstall/v/lib/python3.7/site-packages/cffi-1.11.5-py3.7-macosx-10.13-x86_64.egg
    Processing dependencies for cffi
    Searching for pycparser
    Reading https://pypi.org/simple/pycparser/
    Downloading https://files.pythonhosted.org/packages/8c/2d/aad7f16146f4197a11f8e91fb81df177adcc2073d36a17b1491fd09df6ed/pycparser-2.18.tar.gz#sha256=99a8ca03e29851d96616ad0404b4aad7d9ee16f25c9f9708a11faf2810f7b226
    Best match: pycparser 2.18
    Processing pycparser-2.18.tar.gz
    Writing /var/folders/6j/3mxc532103ld9s_9xlfm1dxc0000gp/T/easy_install-q6g_ii7i/pycparser-2.18/setup.cfg
    Running pycparser-2.18/setup.py -q bdist_egg --dist-dir /var/folders/6j/3mxc532103ld9s_9xlfm1dxc0000gp/T/easy_install-q6g_ii7i/pycparser-2.18/egg-dist-tmp-itptced_
    warning: no previously-included files matching 'yacctab.*' found under directory 'tests'
    warning: no previously-included files matching 'lextab.*' found under directory 'tests'
    warning: no previously-included files matching 'yacctab.*' found under directory 'examples'
    warning: no previously-included files matching 'lextab.*' found under directory 'examples'
    zip_safe flag not set; analyzing archive contents...
    pycparser.ply.__pycache__.lex.cpython-37: module references __file__
    pycparser.ply.__pycache__.lex.cpython-37: module MAY be using inspect.getsourcefile
    pycparser.ply.__pycache__.yacc.cpython-37: module references __file__
    pycparser.ply.__pycache__.yacc.cpython-37: module MAY be using inspect.getsourcefile
    pycparser.ply.__pycache__.yacc.cpython-37: module MAY be using inspect.stack
    pycparser.ply.__pycache__.ygen.cpython-37: module references __file__
    creating /Users/joe/Developer/easyinstall/v/lib/python3.7/site-packages/pycparser-2.18-py3.7.egg
    Extracting pycparser-2.18-py3.7.egg to /Users/joe/Developer/easyinstall/v/lib/python3.7/site-packages
    Adding pycparser 2.18 to easy-install.pth file
    
    Installed /Users/joe/Developer/easyinstall/v/lib/python3.7/site-packages/pycparser-2.18-py3.7.egg
    Finished processing dependencies for cffi
    (v) bash-3.2$ python
    Python 3.7.0 (default, Jun 29 2018, 20:13:13) 
    [Clang 9.1.0 (clang-902.0.39.2)] on darwin
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import cffi
    >>> import _cffi_backend
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    ImportError: dlopen(/Users/joe/Developer/easyinstall/v/lib/python3.7/site-packages/cffi-1.11.5-py3.7-macosx-10.13-x86_64.egg/_cffi_backend.so, 2): Symbol not found: __PyThreadState_Current
      Referenced from: /Users/joe/Developer/easyinstall/v/lib/python3.7/site-packages/cffi-1.11.5-py3.7-macosx-10.13-x86_64.egg/_cffi_backend.so
      Expected in: flat namespace
     in /Users/joe/Developer/easyinstall/v/lib/python3.7/site-packages/cffi-1.11.5-py3.7-macosx-10.13-x86_64.egg/_cffi_backend.so
    >>> 
    

    So a lot of packages are affected until that file gets fixed since many things still resort to easy_install one way or another.

  8. Armin Rigo

    It doesn't make sense that cffi-1.11.5-cp34-abi3-macosx_10_6_intel.whl is used. This is the version cp34! Of course it fails in the way you report, because CPython 3.4 requires the use of the symbol _PyThreadState_Current which was removed in CPython 3.6. It looks indeed like setuptools or easy_install is getting very confused.

  9. Armin Rigo

    ...or no, wait a second. Looking at https://pypi.org/project/cffi/#files . There are both cffi-1.11.5-cp34-abi3-macosx* and also cffi-1.11.5-cp34-cp34m-macosx*, cffi-1.11.5-cp35-cp35m-macosx, etc. That's the only time there is abi3 in these file names. I think it means "portable across versions". But that's bogus, it is not portable at all. Do you agree that we should remove `cffi-1.11.5-cp34-abi3-macosx*, and that removing it should fix the problem?

  10. ilove zfs reporter
    (v) iMac-TMP:fixed joe$ easy_install cffi
    Searching for cffi
    Reading https://pypi.org/simple/cffi/
    Downloading https://files.pythonhosted.org/packages/0b/ba/32835c9965d8a0090723e1d0b47373365525c4bd08c807b5efdc9fecbc99/cffi-1.11.5-cp37-cp37m-macosx_10_9_x86_64.whl#sha256=ca1bd81f40adc59011f58159e4aa6445fc585a32bb8ac9badf7a2c1aa23822f2
    Best match: cffi 1.11.5
    Processing cffi-1.11.5-cp37-cp37m-macosx_10_9_x86_64.whl
    Installing cffi-1.11.5-cp37-cp37m-macosx_10_9_x86_64.whl to /Users/joe/Developer/fixed/v/lib/python3.7/site-packages
    writing requirements to /Users/joe/Developer/fixed/v/lib/python3.7/site-packages/cffi-1.11.5-py3.7-macosx-10.11-x86_64.egg/EGG-INFO/requires.txt
    Adding cffi 1.11.5 to easy-install.pth file
    
    Installed /Users/joe/Developer/fixed/v/lib/python3.7/site-packages/cffi-1.11.5-py3.7-macosx-10.11-x86_64.egg
    Processing dependencies for cffi
    Searching for pycparser
    Reading https://pypi.org/simple/pycparser/
    Downloading https://files.pythonhosted.org/packages/8c/2d/aad7f16146f4197a11f8e91fb81df177adcc2073d36a17b1491fd09df6ed/pycparser-2.18.tar.gz#sha256=99a8ca03e29851d96616ad0404b4aad7d9ee16f25c9f9708a11faf2810f7b226
    Best match: pycparser 2.18
    Processing pycparser-2.18.tar.gz
    Writing /var/folders/w6/9r0nb9011glb8fdz__srd78c0000gq/T/easy_install-mzesl8ib/pycparser-2.18/setup.cfg
    Running pycparser-2.18/setup.py -q bdist_egg --dist-dir /var/folders/w6/9r0nb9011glb8fdz__srd78c0000gq/T/easy_install-mzesl8ib/pycparser-2.18/egg-dist-tmp-uv2vwhzv
    warning: no previously-included files matching 'yacctab.*' found under directory 'tests'
    warning: no previously-included files matching 'lextab.*' found under directory 'tests'
    warning: no previously-included files matching 'yacctab.*' found under directory 'examples'
    warning: no previously-included files matching 'lextab.*' found under directory 'examples'
    zip_safe flag not set; analyzing archive contents...
    pycparser.ply.__pycache__.lex.cpython-37: module references __file__
    pycparser.ply.__pycache__.lex.cpython-37: module MAY be using inspect.getsourcefile
    pycparser.ply.__pycache__.yacc.cpython-37: module references __file__
    pycparser.ply.__pycache__.yacc.cpython-37: module MAY be using inspect.getsourcefile
    pycparser.ply.__pycache__.yacc.cpython-37: module MAY be using inspect.stack
    pycparser.ply.__pycache__.ygen.cpython-37: module references __file__
    creating /Users/joe/Developer/fixed/v/lib/python3.7/site-packages/pycparser-2.18-py3.7.egg
    Extracting pycparser-2.18-py3.7.egg to /Users/joe/Developer/fixed/v/lib/python3.7/site-packages
    Adding pycparser 2.18 to easy-install.pth file
    
    Installed /Users/joe/Developer/fixed/v/lib/python3.7/site-packages/pycparser-2.18-py3.7.egg
    Finished processing dependencies for cffi
    (v) iMac-TMP:fixed joe$ python3
    Python 3.7.0 (default, Jun 29 2018, 20:13:53) 
    [Clang 8.0.0 (clang-800.0.42.1)] on darwin
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import cffi
    >>> import _cffi_backend
    >>> 
    

    Looks fixed.

  11. ilove zfs reporter

    And for completeness:

    (v) iMac-TMP:fixed joe$ pip3 install --no-deps --no-binary :all: --ignore-installed brotlipy
    Collecting brotlipy
      Using cached https://files.pythonhosted.org/packages/d9/91/bc79b88590e4f662bd40a55a2b6beb0f15da4726732efec5aa5a3763d856/brotlipy-0.7.0.tar.gz
    Skipping bdist_wheel for brotlipy, due to binaries being disabled for it.
    Installing collected packages: brotlipy
      Running setup.py install for brotlipy ... done
    Successfully installed brotlipy-0.7.0
    (v) iMac-TMP:fixed joe$ 
    
  12. Armin Rigo

    OK good. I'm leaving this issue opened until the co-maintainer who uploaded the new 3.7 version can check his build script. I think it is buggy. The C parts of CFFI don't compile at all with Py_LIMITED_API defined, so a file with the abi3 name in it and which contains _cffi_backend.so should normally never be produced.

  13. Armin Rigo

    Can you (1) try again; (2) if it still fails then open a new issue where you describe the problem as you see it? It would help if there was a short description of what the current problem is, so that I can ask around for help from someone that would happen to have OS X.

  14. PattoMsavage

    sorry I wasn't specific enough. I am on Windows 10, Python 3.7.2 and was trying to install flask_bcrypt that needs cffi.

    pip install flask_bcrypt
    

    failed due to cffi not being installed.

    pip install cffi
    

    also failed.

    easy_install cffi
    

    successfully installed cffi.

  15. Log in to comment