Module 'setuptools.build_meta' has no attribute '__legacy__'

I am trying to install RASA on Ubuntu: It is erroring out with:

Collecting SQLAlchemy<1.4.0,>=1.3.3 Using cached SQLAlchemy-1.3.15.tar.gz (6.1 MB) Installing build dependencies … done Getting requirements to build wheel … error ERROR: Command errored out with exit status 1: command: /home/ttl-admin/venv/bin/python3 /home/ttl-admin/venv/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmp250mutl4 cwd: /tmp/pip-install-fqy_pq1y/SQLAlchemy Complete output (10 lines): Traceback (most recent call last): File “/home/ttl-admin/venv/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py”, line 257, in main() File “/home/ttl-admin/venv/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py”, line 240, in main json_out[‘return_val’] = hook(**hook_input[‘kwargs’]) File “/home/ttl-admin/venv/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py”, line 85, in get_requires_for_build_wheel backend = _build_backend() File “/home/ttl-admin/venv/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py”, 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: /home/ttl-admin/venv/bin/python3 /home/ttl-admin/venv/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmp250mutl4 Check the logs for full command output.

What version of rasa are you trying to build?

I am building Rasa 1.8.1.

Based on some other query in forum, I removed system site packages during venv creation, then it worked.

Can you plz help Im having the same isssue

I solve this problem by changing Python 3.6.5 to Python 3.7.7.