Coder Social home page Coder Social logo

m1-developer-tools-test's Introduction

Test of developer tools on Apple M1

This README covers setup. For some use cases, see subdirectories:

Basic tools

# Command line developer tools - git, clang, curl, vim etc.
xcode-select --install

# Emulation layer to run x86_64 (Intel) binaries on aarch64 (M1)
softwareupdate --install-rosetta --agree-to-license

Homebrew

bash -c "$(curl -fsSL --proto '=https' --tlsv1.2 https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
source ~/.zprofile

Anaconda via Miniforge

Download from github.com/conda-forge/miniforge/releases/latest

# Compute SHA-256 checksum
shasum -a 256 Miniforge3-4.10.0-0-MacOSX-arm64.sh
f939014048e40d127082c41b66bb98760fa2ce586b0b0dc043f6a38c78198e78

# Check if it matches
cat Miniforge3-4.10.0-0-MacOSX-arm64.sh.sha256
f939014048e40d127082c41b66bb98760fa2ce586b0b0dc043f6a38c78198e78

# Install
sh Miniforge3-4.10.0-0-MacOSX-arm64.sh

# Follow on screen instructions

Anaconda for legacy Python versions

shasum -a 256 Miniforge3-4.10.0-0-MacOSX-x86_64.sh
cat Miniforge3-4.10.0-0-MacOSX-x86_64.sh.sha256

# Install - note the `arch` command
arch -x86_64 sh Miniforge3-4.10.0-0-MacOSX-x86_64.sh

Switch between arm64 conda and x86_64 conda

This solution is not elegant if you expect to use both versions frequently.

# Switch to x86_64
/Users/<you>/<path to x86_64 miniforge installation>/bin/conda init zsh
source ~/.zshrc

# Switch back to arm64
/Users/<you>/<path to arm64 miniforge installation>/bin/conda init zsh
source ~/.zshrc

Poetry

python-poetry.org/docs

curl -sSL --proto '=https' --tlsv1.2 https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python -

echo 'export PATH="$HOME/.poetry/bin:$PATH"' >> ~/.zshrc

Java 8 and 11

Manage several Java versions with jenv

brew install jenv

# Follow on screen instructions - add the following to ~./zshrc
export PATH="$HOME/.jenv/bin:$PATH"
eval "$(jenv init -)"

# Update profile
source ~/.zshrc

# Test
jenv doctor

Java 8 and 11

Check package availability at brew.sh.

brew install AdoptOpenJDK/openjdk/adoptopenjdk8 openjdk@11
# DO NOT add to your $PATH if you want to use `jenv`

# Add environments
jenv add /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home
jenv add /opt/homebrew/opt/openjdk@11

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.