Very slow loading of the Convnet pretrained model on lesson 1

I am able to reliably reproduce the problem in Jupyter. But when I run python from bash to execute this script:

from fastai.imports import *

from fastai.transforms import *
from fastai.conv_learner import *
from fastai.model import *
from fastai.dataset import *
from fastai.sgdr import *
from fastai.plots import *


PATH = "data/dogscats/"

sz=224

data = ImageClassifierData.from_paths(PATH, tfms=tfms_from_model(resnet34, sz))
learn = ConvLearner.pretrained(resnet34, data, precompute=True)
learn.fit(0.01, 1)

log_preds = learn.predict()
log_preds.shape

preds = np.argmax(log_preds, axis=1)  # from log probabilities to 0 or 1
probs = np.exp(log_preds[:,1]) 

learn = ConvLearner.pretrained(resnet34, data, precompute=True)

lrf=learn.lr_find()

tfms = tfms_from_model(resnet34, sz, aug_tfms=transforms_side_on, max_zoom=1.1)

data = ImageClassifierData.from_paths(PATH, tfms=tfms)

learn = ConvLearner.pretrained(resnet34, data, precompute=True)

learn.fit(1e-2, 1)

learn.precompute=False

learn.fit(1e-2, 3, cycle_len=1)

I get the following exception instead (and there is no freezing at the start like there is in Jupyter):

Exception ignored in: <bound method DataLoaderIter.__del__ of <torch.utils.data.dataloader.DataLoaderIter object at 0x7fce2b447e48>>
Traceback (most recent call last):
  File "/home/z/anaconda3/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 241, in __del__
  File "/home/z/anaconda3/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 235, in _shutdown_workers
  File "/home/z/anaconda3/lib/python3.6/threading.py", line 521, in set
  File "/home/z/anaconda3/lib/python3.6/threading.py", line 364, in notify_all
  File "/home/z/anaconda3/lib/python3.6/threading.py", line 347, in notify
TypeError: 'NoneType' object is not callable
Exception ignored in: <bound method DataLoaderIter.__del__ of <torch.utils.data.dataloader.DataLoaderIter object at 0x7fce2b447c88>>
Traceback (most recent call last):
  File "/home/z/anaconda3/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 241, in __del__
  File "/home/z/anaconda3/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 235, in _shutdown_workers
  File "/home/z/anaconda3/lib/python3.6/threading.py", line 521, in set
  File "/home/z/anaconda3/lib/python3.6/threading.py", line 364, in notify_all
  File "/home/z/anaconda3/lib/python3.6/threading.py", line 347, in notify
TypeError: 'NoneType' object is not callable
Exception ignored in: <bound method DataLoaderIter.__del__ of <torch.utils.data.dataloader.DataLoaderIter object at 0x7fce2b270fd0>>
Traceback (most recent call last):
  File "/home/z/anaconda3/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 241, in __del__
  File "/home/z/anaconda3/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 235, in _shutdown_workers
  File "/home/z/anaconda3/lib/python3.6/threading.py", line 521, in set
  File "/home/z/anaconda3/lib/python3.6/threading.py", line 364, in notify_all
  File "/home/z/anaconda3/lib/python3.6/threading.py", line 347, in notify
TypeError: 'NoneType' object is not callable
Exception ignored in: <bound method DataLoaderIter.__del__ of <torch.utils.data.dataloader.DataLoaderIter object at 0x7fce2b22ac18>>
Traceback (most recent call last):
  File "/home/z/anaconda3/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 241, in __del__
  File "/home/z/anaconda3/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 235, in _shutdown_workers
  File "/home/z/anaconda3/lib/python3.6/threading.py", line 521, in set
  File "/home/z/anaconda3/lib/python3.6/threading.py", line 364, in notify_all
  File "/home/z/anaconda3/lib/python3.6/threading.py", line 347, in notify
TypeError: 'NoneType' object is not callable

Has anybody else tried to reproduce this outside of Jupyter? Maybe I just copied the code incorrectly.