I was running into all kinds of dependency mismatches. I created a blog post here:
Here are the relevant steps to get the correct library installed:
- Get Python 3.10
- brew install python@3.10
- Create a virtual environment which is python3.10 based
- In the terminal window run
- python3.10 -m venv .fastai2
- source ~/.fastai2/bin/activate
- Note: this creates a virtual environment from which you can install pre-reqs which could be incompatible with the currently installed default python version. For example, pytorch 2.0.1 is incompatible with python3.12.
- Install the pre-reqs (in terminal using Python env)
- pip3 install -Uqq git+https://github.com/fastai/course22p2
- (Installs all of the miniai components created in earlier notebooks)
- pip3 install torch==2.0.1 torchvision==0.15.2 torchaudio==2.0.2
- pip3 install matplotlib
- pip3 install jupyter
- pip3 install numpy==1.23
- Run jupyter (in terminal using Python env)
- jupyter lab
- Copy string which looks like this from Jupyter startup on-screen logging:
- Launch colab in browser
- Open notebook from github repo (I verified these on Google Colab)
- Select “Connect to local runtime”
- Paste in string from step 4b.
- Run the cells in the notebook, voila!