Error while installing fastai library using pip

Hi all,
I was trying to deploy my model on AWS as explained in Lecture 2 of course v3. I’m facing below-mentioned issue while installing fastai on AWS’s Ubuntu server.

Requirement already satisfied: fastai in /usr/local/lib/python3.6/dist-packages (1.0.60)
Collecting dataclasses; python_version < “3.7”
Using cached dataclasses-0.7-py3-none-any.whl (18 kB)
Collecting torchvision
Using cached torchvision-0.5.0-cp36-cp36m-manylinux1_x86_64.whl (4.0 MB)
Requirement already satisfied: packaging in /usr/local/lib/python3.6/dist-packages (from fastai) (20.1)
Requirement already satisfied: requests in /usr/local/lib/python3.6/dist-packages (from fastai) (2.20.0)
Collecting fastprogress>=0.2.1
Using cached fastprogress-0.2.2-py3-none-any.whl (12 kB)
Requirement already satisfied: torch>=1.0.0 in /usr/local/lib/python3.6/dist-packages (from fastai) (1.0.0)
Requirement already satisfied: pandas in /usr/local/lib/python3.6/dist-packages (from fastai) (0.24.2)
Collecting spacy>=2.0.18
Using cached spacy-2.2.3-cp36-cp36m-manylinux1_x86_64.whl (10.4 MB)
Requirement already satisfied: scipy in /usr/local/lib/python3.6/dist-packages (from fastai) (1.4.1)
Collecting beautifulsoup4
Using cached beautifulsoup4-4.8.2-py3-none-any.whl (106 kB)
Requirement already satisfied: numpy>=1.15 in /usr/local/lib/python3.6/dist-packages (from fastai) (1.15.4)
Collecting nvidia-ml-py3
Using cached nvidia-ml-py3-7.352.0.tar.gz (19 kB)
Requirement already satisfied: Pillow in /usr/lib/python3/dist-packages (from fastai) (5.1.0)
Requirement already satisfied: matplotlib in /usr/local/lib/python3.6/dist-packages (from fastai) (3.0.3)
Collecting bottleneck
Using cached Bottleneck-1.3.2.tar.gz (88 kB)
Installing build dependencies … done
Getting requirements to build wheel … error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 /usr/local/lib/python3.6/dist-packages/pip/_vendor/pep517/ get_requires_for_build_wheel /tmp/tmp0k_4c6pb
cwd: /tmp/pip-install-3m1ppvvy/bottleneck
Complete output (10 lines):
Traceback (most recent call last):
File “/usr/local/lib/python3.6/dist-packages/pip/_vendor/pep517/”, line 257, in
File “/usr/local/lib/python3.6/dist-packages/pip/_vendor/pep517/”, line 240, in main
json_out[‘return_val’] = hook(**hook_input[‘kwargs’])
File “/usr/local/lib/python3.6/dist-packages/pip/_vendor/pep517/”, line 85, in get_requires_for_build_wheel
backend = _build_backend()
File “/usr/local/lib/python3.6/dist-packages/pip/_vendor/pep517/”, line 76, in _build_backend
obj = getattr(obj, path_part)
AttributeError: module ‘setuptools.build_meta’ has no attribute ‘legacy
ERROR: Command errored out with exit status 1: /usr/bin/python3 /usr/local/lib/python3.6/dist-packages/pip/_vendor/pep517/ get_requires_for_build_wheel /tmp/tmp0k_4c6pb Check the logs for full command output.

1 Like