Dyld: Symbol not found

I’ve installed pytorch and fastai via conda:

conda list
fastai                    1.0.28                     py_1    fastai
pytorch                   1.0.0                   py3.6_1    pytorch
torchtext                 0.3.1                     <pip>
torchvision               0.2.1                      py_2    pytorch

I’m using one of the fastai models.
Nevertheless, I think this is the right forum to post my problem, it seems related to pytorch internals.
The code to load the model is this ( the very last line is the one that fails):

import numpy as np
import torch
from fastai import untar_data, URLs
import pickle
from fastai.text import get_language_model
from torchtext import data

# puzzling the pieces together
# get weights and itos
model_path = untar_data(URLs.WT103, data=False)
fnames = [list(model_path.glob(f'*.{ext}'))[0] for ext in ['pth', 'pkl']]
wgts_fname, itos_fname = fnames
itos = pickle.load(open(itos_fname, 'rb'))
wgts = torch.load(wgts_fname, map_location=lambda storage, loc: storage)

It produces the error:

dyld: Symbol not found: _PySlice_Unpack
  Referenced from: /anaconda3/envs/t1/lib/python3.6/site-packages/torch/lib/libtorch_python.dylib
  Expected in: flat namespace

What does this mean and how can I fix it?

Was PyTorch or fastai working before or is it a fresh install on your Mac?
Which Python version are you using? Is it older than 2.7?

I am facing a similar error. My system is linux.

python: symbol lookup error: /home/samarth/anaconda3/lib/python3.6/site-packages/torch/lib/libtorch_python.so: undefined symbol: PySlice_Unpack

Any suggestions will be highly appreciated. Thanks in advance.

Which Python version are you using?
Maybe updating might resolve this issue as described here.