@@ -5,7 +5,7 @@ from Intel processors to Apple silicon in Mac computers.
55
66Software is created with specific hardware in mind. In the past, software was made
77for Macs with Intel processors, which use the ` x86 ` instruction set. Now,
8- software needs to be created for both Intel and Apple silicon (which uses the ` ARM ` instruction set)
8+ software needs to be created for both Intel and Apple Silicon (which uses the ` ARM ` instruction set)
99in order for the software to work efficiently and properly for each platform.
1010
1111## Rosetta
@@ -20,7 +20,7 @@ ARM-based processors.
2020softwareupdate --install-rosetta --agree-to-license
2121```
2222
23- In addition to configuring Homebrew for M1 , add a second Homebrew installation for
23+ In addition to configuring Homebrew for Silicon , add a second Homebrew installation for
2424the ` x86_64 ` architecture.
2525
2626``` shell
@@ -31,7 +31,7 @@ By default, simply use the brew command when installing any brew packages,
3131but add an alias to your startup files for the ` x86 ` version of
3232Homebrew, such as the following. This will allow you to easily install dependencies
3333that are only supported on the ` x86_64 ` architecture. You can add the following
34- line to your ` ~/.zshrc ` or similar file:
34+ line to your ` ~/.zshrc ` or similar file to give x86 HomeBrew the alias of ` xbrew ` :
3535
3636``` shell
3737alias xbrew=" arch -x86_64 /usr/local/bin/brew"
@@ -46,48 +46,26 @@ modules with components written in other programming languages: like `numpy`, `p
4646
4747When maintainers upload a compiled package to PyPI they also will typically upload
4848compiled wheel (binary) files which come with variants for your exact system:
49- ` MacOS x ARM x Python 3.11 ` . However for older versions of the packages and python versions it is
49+ ` MacOS x ARM x Python 3.11 ` . However, for older versions of the packages and python versions it is
5050common for these wheels to be missing for our ` MacOS x ARM ` machines.
5151
52- To fix this issue of wheel compatibility of our systems we will use [ Rosetta] to
52+ To fix this issue of wheel compatibility of our systems we will use [ Rosetta] and [ uv ] to
5353install and use an ` x86 ` version of Python instead. This way we can use ` x86 ` versions
5454of the wheels for packages which can be much more widely available.
5555
56- > [ !IMPORTANT] dotfiles
57- > If you're using the dotfiles from this project, this process can be streamlined
58- > as long as you have the ` x86 ` version of Homebrew installed (described above).
59- > The ` xbrew ` and ` xpython ` aliases are already included in the dotfiles - and there
60- > is an ` XBrewfile ` in the ` macos ` directory that can be used to install all the current
61- > Python versions:
62- >
63- > ``` shell
64- > xbrew bundle --file ~ /.dotfiles/macos/XBrewfile
65- > xpython3.8 -m venv .venv
66- > source .venv/bin/activate
67- > ` ` `
68-
69- 1. Install your base ` x86` Version of Python
70-
71- - The example above is for ` Python 3.8` but it’s good to have one
72- installed for all major versions.
73-
74- ` ` ` shell
75- 76- ```
77-
78- 2. Create a Virtual Environment in your repository’s ` .venv` directory using that ` x86` Python
56+ 1 . Create a Virtual Environment in your repository’s ` .venv ` directory using an ` x86 ` Python
7957
8058 ``` shell
81- " $( xbrew --prefix [email protected] ) /bin/python3.8 " -m venv . venv 59+ UV_PYTHON=3.11-x86_64 uv venv
8260 ```
8361
84- 3 . Activate the ` x86` Python Virtual Environment you just created.
62+ 2 . Activate the ` x86` Python Virtual Environment you just created.
8563
8664 ` ` ` shell
8765 source .venv/bin/activate
8866 ` ` `
8967
90- 4 . Install any tools or requirements you might need
68+ 3 . Install any tools or requirements you might need
9169
9270 - Using ` x86` python versions to run tools like ` tox` , which
9371 creates its own virtual environments, can be especially important
0 commit comments