Getting Started with Fast.ai with GPU

Asish Binu Mathew
Analytics Vidhya
Published in
2 min readMar 30, 2020

We all have been there, sometimes it’s hard to get everything going initially.I will be putting down a comprehensive guide on how to install fastai library.There are generally two ways to install fastai library in windows

  • Using the Python
  • Using anaconda

I will be covering the one with Python because I always felt that it was easier.

Just to be on the safe side it’s better that you uninstall any previous python version that are already installed.

  1. Download and install Python 3.x 64-bit from here. Make sure you tick add Python to path checkbox.
  2. Download and install CUDA toolkit from NVIDIA . Select your architecture and OS and download the package. Visit this site to check whether your GPU is CUDA enabled. Skip this step if you don’t have an Nvidia GPU with CUDA enabled.
  3. fastai library runs on top of PyTorch, so we must install PyTorch from here.
    Select
    PyTorch Build=Stable
    Your OS=Windows
    Package=Pip
    Language=Python
    CUDA=10.1 or change it if you have installed a different CUDA version in step 2.
    Copy the command generated and run it in your terminal. PyTorch will be installed with GPU support.
  4. Now we need to install build tools, download this package, and during installation check the default checkbox.
  5. After completing the above steps, execute the following in your terminal for installing the fastai library.
pip install fastai

Note this will only install fastai library you might need other packages like jupyter notebook, numpy and pandas and more, to install those copy paste the following commands.

pip install jupyter 
pip install pandas
pip install seaborn
pip install matplotlib
pip install numpy

These are only the essential packages needed.

--

--