title: macOS Big Sur: _cffi_backend.cpython-39-darwin.so: mach-o, but wrong architecture
body: <p>When trying to install pycares on my mac (Big Sur 11.3.1) with <code>pip3 install -r pycares</code> I get the following error:</p>
  <pre><code>Collecting pycares
    Using cached pycares-4.0.0.tar.gz (819 kB)
      ERROR: Command errored out with exit status 1:
       command: /opt/homebrew/opt/python@3.9/bin/python3.9 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '&quot;'&quot;'/private/var/folders/jv/yxdbb6tn6n5gc9w719g8rt48000170/T/pip-install-59emzx2m/pycares_c75c0122a38f404d9813047a7451425b/setup.py'&quot;'&quot;'; __file__='&quot;'&quot;'/private/var/folders/jv/yxdbb6tn6n5gc9w719g8rt48000170/T/pip-install-59emzx2m/pycares_c75c0122a38f404d9813047a7451425b/setup.py'&quot;'&quot;';f = getattr(tokenize, '&quot;'&quot;'open'&quot;'&quot;', open)(__file__) if os.path.exists(__file__) else io.StringIO('&quot;'&quot;'from setuptools import setup; setup()'&quot;'&quot;');code = f.read().replace('&quot;'&quot;'\r\n'&quot;'&quot;', '&quot;'&quot;'\n'&quot;'&quot;');f.close();exec(compile(code, __file__, '&quot;'&quot;'exec'&quot;'&quot;'))' egg_info --egg-base /private/var/folders/jv/yxdbb6tn6n5gc9w719g8rt48000170/T/pip-pip-egg-info-1ig5h0aa
           cwd: /private/var/folders/jv/yxdbb6tn6n5gc9w719g8rt48000170/T/pip-install-59emzx2m/pycares_c75c0122a38f404d9813047a7451425b/
      Complete output (29 lines):
      Traceback (most recent call last):
        File &quot;&lt;string&gt;&quot;, line 1, in &lt;module&gt;
        File &quot;/private/var/folders/jv/yxdbb6tn6n5gc9w719g8rt48000170/T/pip-install-59emzx2m/pycares_c75c0122a38f404d9813047a7451425b/setup.py&quot;, line 16, in &lt;module&gt;
          setup(name             = 'pycares',
        File &quot;/opt/homebrew/lib/python3.9/site-packages/setuptools/__init__.py&quot;, line 153, in setup
          return distutils.core.setup(**attrs)
        File &quot;/opt/homebrew/Cellar/python@3.9/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/core.py&quot;, line 108, in setup
          _setup_distribution = dist = klass(attrs)
        File &quot;/opt/homebrew/lib/python3.9/site-packages/setuptools/dist.py&quot;, line 455, in __init__
          _Distribution.__init__(self, {
        File &quot;/opt/homebrew/Cellar/python@3.9/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py&quot;, line 292, in __init__
          self.finalize_options()
        File &quot;/opt/homebrew/lib/python3.9/site-packages/setuptools/dist.py&quot;, line 801, in finalize_options
          ep(self)
        File &quot;/opt/homebrew/lib/python3.9/site-packages/setuptools/dist.py&quot;, line 808, in _finalize_setup_keywords
          ep.load()(self, ep.name, value)
        File &quot;/private/var/folders/jv/yxdbb6tn6n5gc9w719g8rt48000170/T/pip-install-59emzx2m/pycares_c75c0122a38f404d9813047a7451425b/.eggs/cffi-1.14.6-py3.9-macosx-11-arm64.egg/cffi/setuptools_ext.py&quot;, line 219, in cffi_modules
          add_cffi_module(dist, cffi_module)
        File &quot;/private/var/folders/jv/yxdbb6tn6n5gc9w719g8rt48000170/T/pip-install-59emzx2m/pycares_c75c0122a38f404d9813047a7451425b/.eggs/cffi-1.14.6-py3.9-macosx-11-arm64.egg/cffi/setuptools_ext.py&quot;, line 49, in add_cffi_module
          execfile(build_file_name, mod_vars)
        File &quot;/private/var/folders/jv/yxdbb6tn6n5gc9w719g8rt48000170/T/pip-install-59emzx2m/pycares_c75c0122a38f404d9813047a7451425b/.eggs/cffi-1.14.6-py3.9-macosx-11-arm64.egg/cffi/setuptools_ext.py&quot;, line 25, in execfile
          exec(code, glob, glob)
        File &quot;src/_cffi_src/build_cares.py&quot;, line 603, in &lt;module&gt;
          ffi = cffi.FFI()
        File &quot;/private/var/folders/jv/yxdbb6tn6n5gc9w719g8rt48000170/T/pip-install-59emzx2m/pycares_c75c0122a38f404d9813047a7451425b/.eggs/cffi-1.14.6-py3.9-macosx-11-arm64.egg/cffi/api.py&quot;, line 48, in __init__
          import _cffi_backend as backend
      ImportError: dlopen(/private/var/folders/jv/yxdbb6tn6n5gc9w719g8rt48000170/T/pip-install-59emzx2m/pycares_c75c0122a38f404d9813047a7451425b/.eggs/cffi-1.14.6-py3.9-macosx-11-arm64.egg/_cffi_backend.cpython-39-darwin.so, 2): no suitable image found.  Did find:
          /private/var/folders/jv/yxdbb6tn6n5gc9w719g8rt48000170/T/pip-install-59emzx2m/pycares_c75c0122a38f404d9813047a7451425b/.eggs/cffi-1.14.6-py3.9-macosx-11-arm64.egg/_cffi_backend.cpython-39-darwin.so: mach-o, but wrong architecture
          /private/var/folders/jv/yxdbb6tn6n5gc9w719g8rt48000170/T/pip-install-59emzx2m/pycares_c75c0122a38f404d9813047a7451425b/.eggs/cffi-1.14.6-py3.9-macosx-11-arm64.egg/_cffi_backend.cpython-39-darwin.so: mach-o, but wrong architecture
      ----------------------------------------
  WARNING: Discarding https://files.pythonhosted.org/packages/25/5a/ed8cc3340b7e83a5e572b5d27387a968a7e52b1e3c269442076ca902b7ba/pycares-4.0.0.tar.gz#sha256=d0154fc5753b088758fbec9bc137e1b24bb84fc0c6a09725c8bac25a342311cd (from https://pypi.org/simple/pycares/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  </code></pre>
  <p>I installed python with brew (Python 3.9.6), removed the packages and tried to reinstall them, still the same error.
  There are some solutions available for the problem <code>mach-o, but wrong architecture</code>, but I couldn't find one for this specific problem.</p>