Skip to content

Commit

Permalink
Merge pull request robcarver17#1308 from hazzlim/update_install
Browse files Browse the repository at this point in the history
docs: update ARM64 MacOS installation instructions
  • Loading branch information
robcarver17 authored Dec 26, 2023
2 parents 317d163 + 6a3e8fd commit 258342d
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 258342d

Please sign in to comment.