title: Installing Cryptography on an Apple Silicon M1 Mac
body: <p>Help! I'm trying to install cryptography on my m1. I know I can run terminal in rosetta mode, but I'm wondering if there is a way not to do that.</p>
  <p>Output:</p>
  <pre><code>    ERROR: Command errored out with exit status 1:
       command: /opt/homebrew/opt/python@3.9/bin/python3.9 /opt/homebrew/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /var/folders/hj/5zfkv68d7lqgrfqt046bn23c0000gn/T/tmpl4sga84k
           cwd: /private/var/folders/hj/5zfkv68d7lqgrfqt046bn23c0000gn/T/pip-install-jko4b562/cryptography_7b1bbc9ece2f481a8e8e9ea03b1a0030
      Complete output (55 lines):
      
          =============================DEBUG ASSISTANCE=============================
          If you are seeing a compilation error please try the following steps to
          successfully install cryptography:
          1) Upgrade to the latest pip and try again. This will fix errors for most
             users. See: https://pip.pypa.io/en/stable/installing/#upgrading-pip
          2) Read https://cryptography.io/en/latest/installation.html for specific
             instructions for your platform.
          3) Check our frequently asked questions for more information:
             https://cryptography.io/en/latest/faq.html
          =============================DEBUG ASSISTANCE=============================
      
      Traceback (most recent call last):
        File &quot;/opt/homebrew/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py&quot;, line 280, in &lt;module&gt;
          main()
        File &quot;/opt/homebrew/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py&quot;, line 263, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File &quot;/opt/homebrew/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py&quot;, line 133, in prepare_metadata_for_build_wheel
          return hook(metadata_directory, config_settings)
        File &quot;/private/var/folders/hj/5zfkv68d7lqgrfqt046bn23c0000gn/T/pip-build-env-9bqzge_f/overlay/lib/python3.9/site-packages/setuptools/build_meta.py&quot;, line 161, in prepare_metadata_for_build_wheel
          self.run_setup()
        File &quot;/private/var/folders/hj/5zfkv68d7lqgrfqt046bn23c0000gn/T/pip-build-env-9bqzge_f/overlay/lib/python3.9/site-packages/setuptools/build_meta.py&quot;, line 145, in run_setup
          exec(compile(code, __file__, 'exec'), locals())
        File &quot;setup.py&quot;, line 44, in &lt;module&gt;
          setup(
        File &quot;/private/var/folders/hj/5zfkv68d7lqgrfqt046bn23c0000gn/T/pip-build-env-9bqzge_f/overlay/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.1_7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/core.py&quot;, line 108, in setup
          _setup_distribution = dist = klass(attrs)
        File &quot;/private/var/folders/hj/5zfkv68d7lqgrfqt046bn23c0000gn/T/pip-build-env-9bqzge_f/overlay/lib/python3.9/site-packages/setuptools/dist.py&quot;, line 432, in __init__
          _Distribution.__init__(self, {
        File &quot;/opt/homebrew/Cellar/python@3.9/3.9.1_7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py&quot;, line 292, in __init__
          self.finalize_options()
        File &quot;/private/var/folders/hj/5zfkv68d7lqgrfqt046bn23c0000gn/T/pip-build-env-9bqzge_f/overlay/lib/python3.9/site-packages/setuptools/dist.py&quot;, line 708, in finalize_options
          ep(self)
        File &quot;/private/var/folders/hj/5zfkv68d7lqgrfqt046bn23c0000gn/T/pip-build-env-9bqzge_f/overlay/lib/python3.9/site-packages/setuptools/dist.py&quot;, line 715, in _finalize_setup_keywords
          ep.load()(self, ep.name, value)
        File &quot;/private/var/folders/hj/5zfkv68d7lqgrfqt046bn23c0000gn/T/pip-build-env-9bqzge_f/overlay/lib/python3.9/site-packages/cffi/setuptools_ext.py&quot;, line 219, in cffi_modules
          add_cffi_module(dist, cffi_module)
        File &quot;/private/var/folders/hj/5zfkv68d7lqgrfqt046bn23c0000gn/T/pip-build-env-9bqzge_f/overlay/lib/python3.9/site-packages/cffi/setuptools_ext.py&quot;, line 49, in add_cffi_module
          execfile(build_file_name, mod_vars)
        File &quot;/private/var/folders/hj/5zfkv68d7lqgrfqt046bn23c0000gn/T/pip-build-env-9bqzge_f/overlay/lib/python3.9/site-packages/cffi/setuptools_ext.py&quot;, line 25, in execfile
          exec(code, glob, glob)
        File &quot;src/_cffi_src/build_openssl.py&quot;, line 77, in &lt;module&gt;
          ffi = build_ffi_for_binding(
        File &quot;src/_cffi_src/utils.py&quot;, line 54, in build_ffi_for_binding
          ffi = build_ffi(
        File &quot;src/_cffi_src/utils.py&quot;, line 74, in build_ffi
          ffi = FFI()
        File &quot;/private/var/folders/hj/5zfkv68d7lqgrfqt046bn23c0000gn/T/pip-build-env-9bqzge_f/overlay/lib/python3.9/site-packages/cffi/api.py&quot;, line 48, in __init__
          import _cffi_backend as backend
      ImportError: dlopen(/private/var/folders/hj/5zfkv68d7lqgrfqt046bn23c0000gn/T/pip-build-env-9bqzge_f/overlay/lib/python3.9/site-packages/_cffi_backend.cpython-39-darwin.so, 2): Symbol not found: _ffi_prep_closure
        Referenced from: /private/var/folders/hj/5zfkv68d7lqgrfqt046bn23c0000gn/T/pip-build-env-9bqzge_f/overlay/lib/python3.9/site-packages/_cffi_backend.cpython-39-darwin.so
        Expected in: flat namespace
       in /private/var/folders/hj/5zfkv68d7lqgrfqt046bn23c0000gn/T/pip-build-env-9bqzge_f/overlay/lib/python3.9/site-packages/_cffi_backend.cpython-39-darwin.so
  </code></pre>
  <p>I've tried to build and run like their instructions say in that code block to the same error. I've looked around and nobody has seemingly found the fix yet, but those things are two months old usually. What am I missing?</p>