Skip to content

1. Installation

Jing Jin edited this page Nov 19, 2024 · 10 revisions

Model Explorer supports Python 3.9 - 3.12 on major Linux distributions, WSL on Windows (with ubuntu 22.04), and macOS. Follow the steps below to install it:

  1. Create a virtual environment (optional):

    $ mkdir <some_dir> && cd <some_dir>
    $ python3 -m venv venv
    $ source venv/bin/activate
    
  2. Install package:

    On Mac

    $ pip install torch i-edge-model-explorer

    On Linux or WSL, use the following command for a faster installation (by only installing PyTorch cpu package)

    $ pip install torch ai-edge-model-explorer \
        --index-url https://download.pytorch.org/whl/cpu \
        --extra-index-url https://pypi.python.org/simple

    ℹ️ You don't need to install torch if you don't want to use Model Explorer to visualize PyTorch models.

  3. Run from command line. The following command will start a server at localhost:8080 and open the Model Explorer web app in a browser tab. See more info in the Command line guide

    $ model-explorer

    It might take up to 30 seconds when running it for the first time.

    Seeing a GLIBCXX_3.4.32 not found error? Try the following steps:

    $ sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
    $ sudo apt install -y gcc-11
    $ sudo apt-get install --only-upgrade libstdc++6
    

Important

Model Explorer respects your privacy. It is a self-contained app and fully functional offline.

Clone this wiki locally