Installing Metaflow

MacOS/Linux

Metaflow is available as an R package for MacOS and Linux. You can get it from our GitHub repository (or very soon from CRAN):
1
devtools::install_github("Netflix/metaflow", subdir="R")
Copied!
You can finish the installation by running install_metaflow() :
1
metaflow::install_metaflow()
Copied!
Behind the scenes, Metaflow relies on the Python Metaflow package, which gets installed in a dedicated conda environment when you execute install_metaflow(). You can instead use a Python virtualenv as well:
1
install_metaflow(method='virtualenv')
Copied!
Metaflow requires Python 3 since Python 3 has fewer bugs and is better supported than the deprecated Python 2.7.
You can test your installation by running:
1
metaflow::test()
Copied!
If you see the message Your Metaflow installation looks good! congratulations! Now you can get started with Metaflow by following the tutorial or you can jump straight into the docs.

Windows Support

Metaflow currently doesn't offer native support for Windows. However, if you are using Windows 10, then you can use WSL (Windows Subsystem for Linux) to install Metaflow. WSL lets you run a Linux environment inside Windows 10.
Follow these instructions to get set up with WSL 2 -
    1.
    Update your Windows 10 distribution to version 2004 or higher.
    2.
    Follow these steps to install WSL 2. When prompted, choose Ubuntu 18.04 as the Linux distribution.
    3.
    Open Ubuntu 18.04 on your workstation, and run the following commands in the terminal to install R and Python -
1
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
2
sudo echo "deb http://cran.wustl.edu/bin/linux/ubuntu bionic-cran35/" | sudo tee -a /etc/apt/sources.list
3
sudo apt update
4
sudo apt install r-base r-base-dev
5
sudo apt install libcurl4-openssl-dev libxml2-dev libssl-dev
6
7
sudo apt-get install python3 python3-pip
8
echo "alias python=python3; alias pip=pip3" > ~/.bash_aliases
9
source ~/.bash_aliases
Copied!
[Optional] Set up RStudio IDE. Inside Ubuntu 18.04 on Windows, run the following commands -
1
sudo apt install -y r-base r-base-core r-recommended r-base-dev gdebi-core build-essential libcurl4-gnutls-dev libxml2-dev libssl-dev
2
wget https://rstudio.org/download/latest/stable/server/bionic/rstudio-server-latest-amd64.deb
3
sudo gdebi rstudio-server-latest-amd64.deb
4
sudo rstudio-server start
Copied!
You can access RStudio at http://localhost:8787 in your browser in Windows.
To install Metaflow - Inside Ubuntu 18.04 on Windows, open the R console (or your RStudio IDE installed in the previous step) and run the following commands -
1
install.packages('devtools', INSTALL_opts = c('--no-lock'))
2
devtools::install_github("netflix/metaflow", subdir = "R")
3
4
metaflow::install_metaflow()
5
metaflow::test()
Copied!
Last modified 1yr ago
Export as PDF
Copy link