back to /blog

M1 MacBook setup for Data Science in 2021

[ blog  ]

I’m in the ongoing process of setting up my new MacBook Air (M1, 2020) for my data analytics projects plus grad-school homework, so I need a very average set up of Homebrew, Python, Pyenv, Jupyterlab, R; on top of some simple things for my blog like Jekyll and Ruby. While doing this, I’ve been encountering issues - mainly because of incompatibilities with python libraries that are not yet updated. I’ll be logging these issues and hopefully whatever workaround I found to solve them.


Steps to set up an M1 for Data Science

  1. Install Xcode and Command Line tools first, as this takes the longest.

  2. Install Homebrew:

     /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" 

    Add Homebrew to PATH:

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

    Then check if it can run with:

     brew —version 
  3. Install GIT:
     brew install git 

    Then, authenticate via SSH to Github so you can connect to your repos.

  4. Unhide files with shift+command+dot and sudo chflags nohidden, and open my bash profile file just to check it out :)

     sudo chflags nohidden /Library/ ~/Library/
    
     user@Camilas-Air ~ % touch . bash_profile
     user@Camilas-Air ~ % open . bash_profile 
  5. Install Python3 the “right” way, without removing python 2.7 because that’s a mistake I’ve made in the past 🤦🏼‍♀️

  6. Install pyenv, pipx, pipenv.

    pyenv instructions from its github repo

     brew update
     brew install pyenv 

    pipenv instructions from its website

     pip install --user pipx
     pipx install pipenv 
  7. Install jupyterlab with pyenv.

    jupyterlab read the docs:

     pipenv install jupyterlab
     pipenv shell
     

    Some help to manage pyenv and jupyter, because I haven’t got to handle this successfully:


  8. Install Ruby and Jekyll, following this repo.

  9. Download R for macOS and R Studio.

Issues encountered:


When I see those issue I realize I have no clue what I’m doing 🥲


Comments

Be the first and only to leave a comment ever - via github on this ticket. Comments should appear on this page instantly, but I woudln't be surprised if it's not working (my bad).