Skip to content

Commit 1aa841b

Browse files
authored
Merge pull request #1323 from pypa/docs-38
Add FAQ entry about Python 3.8 native arm64 workaround
2 parents 76aa7b3 + 179a10c commit 1aa841b

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

docs/faq.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,25 @@ To work around this, use a different environment variable such as `REPAIR_LIBRAR
339339

340340
See [#816](https://github.com/pypa/cibuildwheel/issues/816), thanks to @phoerious for reporting.
341341

342+
### macOS: Building CPython 3.8 wheels on arm64
343+
344+
If you're building on an arm64 runner, you might notice something strange about CPython 3.8 - unlike Python 3.9+, it's cross-compiled to arm64 from an x86_64 version of Python running under Rosetta emulation. This is because (despite the prevalence of arm64 versions of Python 3.8 from Apple and Homebrew) there is no officially supported Python.org installer of Python 3.8 for arm64.
345+
346+
This is fine for simple C extensions, but for more complicated builds on arm64 it becomes an issue.
347+
348+
So, if the cross-compilation is an issue for you, there is an 'experimental' installer available that's built natively for arm64.
349+
350+
To use this installer and perform native CPython 3.8 building, before invoking cibuildwheel, install the universal2 version of Python on your arm64 runner, something like:
351+
352+
353+
```bash
354+
curl -o /tmp/Python38.pkg https://www.python.org/ftp/python/3.8.10/python-3.8.10-macos11.pkg
355+
sudo installer -pkg /tmp/Python38.pkg -target /
356+
sh "/Applications/Python 3.8/Install Certificates.command"
357+
```
358+
359+
Then cibuildwheel will detect that it's installed and use it instead. However, you probably don't want to build x86_64 wheels on this Python, unless you're happy with them only supporting macOS 11+.
360+
342361
### Windows: 'ImportError: DLL load failed: The specific module could not be found'
343362

344363
Visual Studio and MSVC link the compiled binary wheels to the Microsoft Visual C++ Runtime. Normally, the C parts of the runtime are included with Python, but the C++ components are not. When compiling modules using C++, it is possible users will run into problems on systems that do not have the full set of runtime libraries installed. The solution is to ask users to download the corresponding Visual C++ Redistributable from the [Microsoft website](https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads) and install it.

0 commit comments

Comments
 (0)