Problem installing fastai on ubuntu 18.04

I’m trying to install fastai, but nothing seems to work out. I have installed pytorch and it is running perfectly.
i tried installing using pip3 install fastai. pip3 because i have python2.7 along with python3.6.
Here’s the output. I upgraded setup tools, that didnt solve the problem.
Collecting fastai
Downloading (189kB)
100% |████████████████████████████████| 194kB 735kB/s
Collecting scipy (from fastai)
Downloading (25.9MB)
100% |████████████████████████████████| 25.9MB 72kB/s
Collecting torchvision>=0.8 (from fastai)
Downloading (12.8MB)
100% |████████████████████████████████| 12.8MB 142kB/s
Collecting fastcore>=1.3.8 (from fastai)
Downloading (51kB)
100% |████████████████████████████████| 61kB 1.9MB/s
Collecting requests (from fastai)
Downloading (61kB)
100% |████████████████████████████████| 61kB 2.1MB/s
Collecting fastprogress>=0.2.4 (from fastai)
Collecting pillow (from fastai)
Downloading (2.2MB)
100% |████████████████████████████████| 2.2MB 580kB/s
Collecting pandas (from fastai)
Downloading (9.5MB)
100% |████████████████████████████████| 9.5MB 190kB/s
Collecting pyyaml (from fastai)
Downloading (269kB)
100% |████████████████████████████████| 276kB 1.6MB/s
Collecting scikit-learn (from fastai)
Downloading (6.8MB)
100% |████████████████████████████████| 6.8MB 218kB/s
Collecting spacy (from fastai)
Downloading (5.8MB)
100% |████████████████████████████████| 5.8MB 284kB/s
Complete output from command python egg_info:
Command “python egg_info” failed with error code 1 in /tmp/pip-build-9n84rlby/thinc/
Traceback (most recent call last):
File “/home/wally1002/.local/lib/python3.6/site-packages/setuptools/”, line 126, in fetch_build_egg
File “/usr/lib/python3.6/”, line 311, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘[’/usr/bin/python3’, ‘-m’, ‘pip’, ‘–disable-pip-version-check’, ‘wheel’, ‘–no-deps’, ‘-w’, ‘/tmp/tmpojkbh6zg’, ‘–quiet’, ‘thinc<7.5.0,>=7.4.1’]’ returned non-zero exit status 1.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/pip-build-nf_o3qal/spacy/", line 252, in <module>
  File "/tmp/pip-build-nf_o3qal/spacy/", line 247, in setup_package
    cmdclass={"build_ext": build_ext_subclass},
  File "/home/wally1002/.local/lib/python3.6/site-packages/setuptools/", line 152, in setup
  File "/home/wally1002/.local/lib/python3.6/site-packages/setuptools/", line 147, in _install_setup_requires
  File "/home/wally1002/.local/lib/python3.6/site-packages/setuptools/", line 676, in fetch_build_eggs
  File "/home/wally1002/.local/lib/python3.6/site-packages/pkg_resources/", line 766, in resolve
  File "/home/wally1002/.local/lib/python3.6/site-packages/pkg_resources/", line 1049, in best_match
    return self.obtain(req, installer)
  File "/home/wally1002/.local/lib/python3.6/site-packages/pkg_resources/", line 1061, in obtain
    return installer(requirement)
  File "/home/wally1002/.local/lib/python3.6/site-packages/setuptools/", line 732, in fetch_build_egg
    return fetch_build_egg(self, req)
  File "/home/wally1002/.local/lib/python3.6/site-packages/setuptools/", line 128, in fetch_build_egg
    raise DistutilsError(str(e)) from e
distutils.errors.DistutilsError: Command '['/usr/bin/python3', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmpojkbh6zg', '--quiet', 'thinc<7.5.0,>=7.4.1']' returned non-zero exit status 1.


Command “python egg_info” failed with error code 1 in /tmp/pip-build-nf_o3qal/spacy/

Its installed. I needed to upgrade pip.
pip3 install --upgrade pip

1 Like