Skip to content

Commit

Permalink
docs: update ARM64 MacOS installation instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
hazzlim committed Dec 22, 2023
1 parent 317d163 commit 6a3e8fd
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 17 deletions.
21 changes: 4 additions & 17 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,26 +136,13 @@ And now install the dependencies

### MacOS (ARM)

If you're running MacOS on one of the new ARM chips, the process is more complex. You'll need Homebrew and the Apple XCode Commandline Development Tools, configured for ARM. Doing that is beyond the scope of this document, type `homebrew apple xcode command line tools` into your favourite search engine. Once installed and configured, install *cython*:
If you're running MacOS on one of the new ARM chips, the process is more complex. You'll need Homebrew and the Apple XCode Commandline Development Tools, configured for ARM. Doing that is beyond the scope of this document, type `homebrew apple xcode command line tools` into your favourite search engine. Once installed and configured, run installation script:

```
(3.8.16) $ OPENBLAS="$(brew --prefix openblas)" MACOSX_DEPLOYMENT_TARGET=12.6 python -m pip install cython --no-use-pep517
```

Then the key dependencies

```
(3.8.16) $ OPENBLAS="$(brew --prefix openblas)" MACOSX_DEPLOYMENT_TARGET=12.6 python -m pip install "numpy>=1.19.4,<1.24.0" --no-use-pep517
(3.8.16) $ OPENBLAS="$(brew --prefix openblas)" MACOSX_DEPLOYMENT_TARGET=12.6 python -m pip install scipy --no-use-pep517
(3.8.16) $ OPENBLAS="$(brew --prefix openblas)" MACOSX_DEPLOYMENT_TARGET=12.6 python -m pip install pandas==1.0.5 --no-use-pep517
(3.8.16) $ OPENBLAS="$(brew --prefix openblas)" MACOSX_DEPLOYMENT_TARGET=12.6 python -m pip install statsmodels==0.12.2 --no-use-pep517
```

Then the remaining dependencies

```
(3.8.16) $ pip install -r requirements.txt
chmod u+x install install_dependencies_apple_silicon.sh
./install_dependencies_apple_silicon.sh
```
Note: this may (unfortunately) become out of date and require some tweaking.

### Check dependencies, all OSs

Expand Down
11 changes: 11 additions & 0 deletions install_dependencies_apple_silicon.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

# Cython 3.0.0 is not supported by pandas 1.0.5
python -m pip install "cython<3.0.0" wheel
python -m pip install pyyaml==5.4.1 --no-build-isolation
python -m pip install "numpy>=1.19.4,<1.24.0" --no-use-pep517
python -m pip install scipy --no-use-pep517
python -m pip install pandas==1.0.5 --no-use-pep517
python -m pip install statsmodels==0.12.2 --no-use-pep517

pip install -r requirements_apple_silicon.txt
9 changes: 9 additions & 0 deletions requirements_apple_silicon.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
matplotlib>=3.0.0
pymongo==3.11.3
arctic==1.79.2
ib-insync==0.9.86
psutil==5.6.6
pytest>6.2
Flask>=2.0.1
Werkzeug>=2.0.1
PyPDF2>=2.5.0

0 comments on commit 6a3e8fd

Please sign in to comment.