Skip to content

How to: Install on Apple Silicon #37

Closed
@weibel

Description

@weibel

I have struggled a bit with installing on the M1 Apple Silicon, but finally managed to get it working.

Here are the steps.

Install a 3.x version of Python with pyenv.
Skip this step if you already have Python 3.x installed or want to install it with another manager

These steps are based on https://laict.medium.com/install-python-on-macos-11-m1-apple-silicon-using-pyenv-12e0729427a9

Install pyenv
brew instal pyenv

Install Python 3.8.6
pyenv install --patch 3.8.6 <<(curl -sSL https://raw.githubusercontent.com/Homebrew/formula-patches/113aa84/python/3.8.3.patch\?full_index\=1)

Set the Python as system default
pyenv global 3.8.6

Install Graphviz and Pygraphviz

Install Graphviz
brew install graphviz

Install Pygraphviz (from pygraphviz/pygraphviz#155 (comment))
pip install --global-option=build_ext --global-option="-I$(brew --prefix graphviz)/include" --global-option="-L$(brew --prefix graphviz)/lib" pygraphviz

Install swift-code-metrics

Install the master branch of swift-code-metrics
pip install --global-option=build_ext --global-option="-I$(brew --prefix graphviz)/include" --global-option="-L$(brew --prefix graphviz)/lib" "git+https://github.com/matsoftware/swift-code-metrics.git#egg=swift-code-metrics"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions