Unable to Install Rasa/ Rasa-x on MacOs High Sierra 10.13.6

Hi,

Im trying to install Rasa on MacOs High Sierra 10.13.6. Im getting below error.

ERROR: Could not build wheels for alembic which use PEP 517 and cannot be installed directly.

I have python version 3.7.4

Please let me know if you need any information.

Thanks

Hi @Coder7771. Can you verify you followed the install steps? Also, can you share the text prior to the error output as well in a code block like below?

ERROR: Could not build wheels for alembic which use PEP 517 and cannot be installed directly.

Hi Ty,

Thank you for reply. Below are the steps I followed. I have Python version 3.7.4 version. Creating Virtual environment: python3 -m venv --system-site-packages ./venv source ./venv/bin/activate

Installing RASA: pip install rasa-x --extra-index-url https://pypi.rasa.com/simple

also tried

pip install rasa

But same error. Below is detailed error msgs again.

Building wheels for collected packages: alembic, ujson, sanic-jwt, mattermostwrapper, terminaltables, colorclass, webexteamssdk, docopt WARNING: Building wheel for alembic failed: [Errno 13] Permission denied: ‘/Users/sundarrapeti/Library/Caches/pip/wheels/4e’ WARNING: Building wheel for ujson failed: [Errno 13] Permission denied: ‘/Users/sundarrapeti/Library/Caches/pip/wheels/55’ WARNING: Building wheel for sanic-jwt failed: [Errno 13] Permission denied: ‘/Users/sundarrapeti/Library/Caches/pip/wheels/be’ WARNING: Building wheel for mattermostwrapper failed: [Errno 13] Permission denied: ‘/Users/sundarrapeti/Library/Caches/pip/wheels/b9’ WARNING: Building wheel for terminaltables failed: [Errno 13] Permission denied: ‘/Users/sundarrapeti/Library/Caches/pip/wheels/ba’ WARNING: Building wheel for colorclass failed: [Errno 13] Permission denied: ‘/Users/sundarrapeti/Library/Caches/pip/wheels/fe’ WARNING: Building wheel for webexteamssdk failed: [Errno 13] Permission denied: ‘/Users/sundarrapeti/Library/Caches/pip/wheels/08’ WARNING: Building wheel for docopt failed: [Errno 13] Permission denied: ‘/Users/sundarrapeti/Library/Caches/pip/wheels/72’ Failed to build alembic ujson sanic-jwt mattermostwrapper terminaltables colorclass webexteamssdk docopt ERROR: Could not build wheels for alembic which use PEP 517 and cannot be installed directly

Thanks

Hi @Coder7771. What happens if you don’t use the --system-site-packages flag?

python3 -m venv ./venv

source ./venv/bin/activate

pip install rasa

Hi Ty,

I have tried the steps you provided. It failed again. Error msgs changed now.

Building wheels for collected packages: absl-py, colorclass, SQLAlchemy, webexteamssdk, terminaltables, ujson, mattermostwrapper, sanic-jwt, pyrsistent, greenlet, future, tornado, docopt, PyYAML, gast, wrapt, termcolor WARNING: Building wheel for absl-py failed: [Errno 13] Permission denied: ‘/Users/sundarrapeti/Library/Caches/pip/wheels/cc’ WARNING: Building wheel for colorclass failed: [Errno 13] Permission denied: ‘/Users/sundarrapeti/Library/Caches/pip/wheels/fe’ WARNING: Building wheel for SQLAlchemy failed: [Errno 13] Permission denied: ‘/Users/sundarrapeti/Library/Caches/pip/wheels/70’ WARNING: Building wheel for webexteamssdk failed: [Errno 13] Permission denied: ‘/Users/sundarrapeti/Library/Caches/pip/wheels/08’ WARNING: Building wheel for terminaltables failed: [Errno 13] Permission denied: ‘/Users/sundarrapeti/Library/Caches/pip/wheels/ba’ WARNING: Building wheel for ujson failed: [Errno 13] Permission denied: ‘/Users/sundarrapeti/Library/Caches/pip/wheels/f7’ WARNING: Building wheel for mattermostwrapper failed: [Errno 13] Permission denied: ‘/Users/sundarrapeti/Library/Caches/pip/wheels/b9’ WARNING: Building wheel for sanic-jwt failed: [Errno 13] Permission denied: ‘/Users/sundarrapeti/Library/Caches/pip/wheels/26’ WARNING: Building wheel for pyrsistent failed: [Errno 13] Permission denied: ‘/Users/sundarrapeti/Library/Caches/pip/wheels/22’ WARNING: Building wheel for greenlet failed: [Errno 13] Permission denied: ‘/Users/sundarrapeti/Library/Caches/pip/wheels/9f’ WARNING: Building wheel for future failed: [Errno 13] Permission denied: ‘/Users/sundarrapeti/Library/Caches/pip/wheels/56’ WARNING: Building wheel for tornado failed: [Errno 13] Permission denied: ‘/Users/sundarrapeti/Library/Caches/pip/wheels/7d’ WARNING: Building wheel for docopt failed: [Errno 13] Permission denied: ‘/Users/sundarrapeti/Library/Caches/pip/wheels/72’ WARNING: Building wheel for PyYAML failed: [Errno 13] Permission denied: ‘/Users/sundarrapeti/Library/Caches/pip/wheels/5e’ WARNING: Building wheel for gast failed: [Errno 13] Permission denied: ‘/Users/sundarrapeti/Library/Caches/pip/wheels/21’ WARNING: Building wheel for wrapt failed: [Errno 13] Permission denied: ‘/Users/sundarrapeti/Library/Caches/pip/wheels/62’ WARNING: Building wheel for termcolor failed: [Errno 13] Permission denied: ‘/Users/sundarrapeti/Library/Caches/pip/wheels/3f’ Failed to build absl-py colorclass SQLAlchemy webexteamssdk terminaltables ujson mattermostwrapper sanic-jwt pyrsistent greenlet future tornado docopt PyYAML gast wrapt termcolor ERROR: Could not build wheels for ujson which use PEP 517 and cannot be installed directly

@Coder7771 What happens if you add the --no-cache-dir flag to the install command?

pip install --no-cache-dir rasa

I did that command now. Earlier issues are not coming now. Below are last few lines. It is saying about Tensorflow. Do you think installation completed?

ERROR: tensorflow 2.1.0 has requirement gast==0.2.2, but you’ll have gast 0.3.3 which is incompatible.

Installing collected packages: attrs, numpy, scipy, kafka-python, tensorflow-estimator, decorator, six, cloudpickle, gast, tensorflow-probability, pytz, tzlocal, apscheduler, redis, python-engineio, python-socketio, pyparsing, cycler, python-dateutil, kiwisolver, matplotlib, tqdm, websockets, multidict, ujson, aiofiles, rfc3986, certifi, chardet, sniffio, h11, hyperframe, hpack, h2, hstspreload, idna, httpx, uvloop, httptools, sanic, zipp, importlib-metadata, pyrsistent, jsonschema, psycopg2-binary, greenlet, gevent, humanfriendly, coloredlogs, sanic-plugins-framework, sanic-cors, urllib3, requests, rasa-sdk, future, requests-toolbelt, PyJWT, webexteamssdk, ruamel.yaml.clib, ruamel.yaml, pyasn1, rsa, httplib2, pyasn1-modules, oauth2client, rocketchat-API, sanic-jwt, tabulate, python-crfsuite, sklearn-crfsuite, absl-py, colorhash, jsonpickle, async-timeout, yarl, aiohttp, packaging, pycparser, cffi, cryptography, tornado, python-telegram-bot, slackclient, async-generator, PyYAML, docopt, pykwalify, fbmessenger, markdown, cachetools, google-auth, oauthlib, requests-oauthlib, google-auth-oauthlib, grpcio, werkzeug, protobuf, tensorboard, google-pasta, h5py, keras-applications, keras-preprocessing, astor, termcolor, wrapt, opt-einsum, tensorflow, tensorflow-addons, networkx, tensorflow-hub, joblib, scikit-learn, mattermostwrapper, colorclass, terminaltables, wcwidth, prompt-toolkit, questionary, pydot, dnspython, pymongo, pika, jmespath, docutils, botocore, s3transfer, boto3, pysocks, twilio, SQLAlchemy, rasa

Successfully installed PyJWT-1.7.1 PyYAML-5.3.1 SQLAlchemy-1.3.17 absl-py-0.9.0 aiofiles-0.5.0 aiohttp-3.6.2 apscheduler-3.6.3 astor-0.8.1 async-generator-1.10 async-timeout-3.0.1 attrs-19.3.0 boto3-1.13.9 botocore-1.16.9 cachetools-4.1.0 certifi-2020.4.5.1 cffi-1.14.0 chardet-3.0.4 cloudpickle-1.3.0 colorclass-2.2.0 coloredlogs-10.0 colorhash-1.0.2 cryptography-2.9.2 cycler-0.10.0 decorator-4.4.2 dnspython-1.16.0 docopt-0.6.2 docutils-0.15.2 fbmessenger-6.0.0 future-0.18.2 gast-0.3.3 gevent-1.5.0 google-auth-1.14.3 google-auth-oauthlib-0.4.1 google-pasta-0.2.0 greenlet-0.4.15 grpcio-1.28.1 h11-0.8.1 h2-3.2.0 h5py-2.10.0 hpack-3.0.0 hstspreload-2020.5.13 httplib2-0.17.3 httptools-0.1.1 httpx-0.9.3 humanfriendly-8.2 hyperframe-5.2.0 idna-2.9 importlib-metadata-1.6.0 jmespath-0.10.0 joblib-0.14.1 jsonpickle-1.4.1 jsonschema-3.2.0 kafka-python-1.4.7 keras-applications-1.0.8 keras-preprocessing-1.1.2 kiwisolver-1.2.0 markdown-3.2.2 matplotlib-3.2.1 mattermostwrapper-2.2 multidict-4.7.5 networkx-2.4 numpy-1.18.4 oauth2client-4.1.3 oauthlib-3.1.0 opt-einsum-3.2.1 packaging-19.0 pika-1.1.0 prompt-toolkit-2.0.10 protobuf-3.11.3 psycopg2-binary-2.8.5 pyasn1-0.4.8 pyasn1-modules-0.2.8 pycparser-2.20 pydot-1.4.1 pykwalify-1.7.0 pymongo-3.8.0 pyparsing-2.4.7 pyrsistent-0.16.0 pysocks-1.7.1 python-crfsuite-0.9.7 python-dateutil-2.8.1 python-engineio-3.12.1 python-socketio-4.5.1 python-telegram-bot-12.7 pytz-2019.3 questionary-1.5.2 rasa-1.10.0 rasa-sdk-1.10.1 redis-3.5.1 requests-2.23.0 requests-oauthlib-1.3.0 requests-toolbelt-0.9.1 rfc3986-1.4.0 rocketchat-API-1.3.1 rsa-4.0 ruamel.yaml-0.16.10 ruamel.yaml.clib-0.2.0 s3transfer-0.3.3 sanic-19.12.2 sanic-cors-0.10.0.post3 sanic-jwt-1.4.1 sanic-plugins-framework-0.9.2 scikit-learn-0.22.2.post1 scipy-1.4.1 six-1.14.0 sklearn-crfsuite-0.3.6 slackclient-2.5.0 sniffio-1.1.0 tabulate-0.8.7 tensorboard-2.1.1 tensorflow-2.1.0 tensorflow-addons-0.7.1 tensorflow-estimator-2.1.0 tensorflow-hub-0.8.0 tensorflow-probability-0.9.0 termcolor-1.1.0 terminaltables-3.1.0 tornado-6.0.4 tqdm-4.45.0 twilio-6.26.3 tzlocal-2.1 ujson-2.0.3 urllib3-1.25.9 uvloop-0.14.0 wcwidth-0.1.9 webexteamssdk-1.3 websockets-8.1 werkzeug-1.0.1 wrapt-1.12.1 yarl-1.4.2 zipp-3.1.0

@Coder7771 I am not sure. Does rasa --version work? If not, then I would try pip install --upgrade gast==0.2.2 and then try the installing again

1 Like

Hi,

I’m also having the exact same problem. I tried what was recommended and it still does not work.

Thank you

Hi @stells. Can you share the command you ran, text prior to the error, and the error in a code block?

Hi @tyd ,

I am getting stuck on the same error. Please advise.

The first time I installed rasa for the Rasa Masterclass, it worked fine.

And now when I try install in again in a new directory for another simple chatbot it keeps failing with the same error message.

Failed to build ujson ERROR: Could not build wheels for ujson which use PEP 517 and cannot be installed directly

And I also tried “–no-cache-dir” option, which also gave me an error, Failed to build ujson greenlet

Here is the what copied from my terminal,

(venv) ~/D/rasa-cand-demo ❯❯❯ python --version

Python 3.7.7 (venv) ~/D/rasa-cand-demo ❯❯❯ pip --version

pip 20.0.2

(venv) ~/D/rasa-cand-demo ❯❯❯ python3.7 -m pip install rasa Collecting rasa Using cached rasa-1.10.1-py3-none-any.whl (509 kB)

Building wheels for collected packages: ujson Building wheel for ujson (PEP 517) … error ERROR: Command errored out with exit status 1: command: /Users/prosmikek/Documents/rasa-cand-demo/venv/bin/python3.7 /Users/prosmikek/Documents/rasa-cand-demo/venv/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /var/folders/f9/4qlm19zd7d96jp_ym_1r6t4w0000gn/T/tmpt28gpdp2 cwd: /private/var/folders/f9/4qlm19zd7d96jp_ym_1r6t4w0000gn/T/pip-install-1gq0bmaw/ujson Complete output (14 lines): running bdist_wheel running build running build_ext building ‘ujson’ extension creating build creating build/temp.macosx-10.9-x86_64-3.7 creating build/temp.macosx-10.9-x86_64-3.7/deps creating build/temp.macosx-10.9-x86_64-3.7/deps/double-conversion creating build/temp.macosx-10.9-x86_64-3.7/deps/double-conversion/double-conversion creating build/temp.macosx-10.9-x86_64-3.7/lib creating build/temp.macosx-10.9-x86_64-3.7/python gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -I./python -I./lib -I./deps/double-conversion/double-conversion -I/Users/prosmikek/Documents/rasa-cand-demo/venv/include -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c ./deps/double-conversion/double-conversion/bignum.cc -o build/temp.macosx-10.9-x86_64-3.7/./deps/double-conversion/double-conversion/bignum.o -D_GNU_SOURCE xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun error: command ‘gcc’ failed with exit status 1

ERROR: Failed building wheel for ujson Failed to build ujson ERROR: Could not build wheels for ujson which use PEP 517 and cannot be installed directly

@qmanpro537 What happens if you run pip install --upgrade wheel before trying again?

@tyd Same error even after I ran the upgrade :frowning_face:

(venv) ~/D/rasa-cand-demo ❯❯❯ pip install --upgrade pip setuptools wheel

Requirement already up-to-date: pip in ./venv/lib/python3.7/site-packages (20.1.1) Collecting setuptools Using cached setuptools-46.4.0-py3-none-any.whl (583 kB) Requirement already up-to-date: wheel in ./venv/lib/python3.7/site-packages (0.34.2) Installing collected packages: setuptools Attempting uninstall: setuptools Found existing installation: setuptools 46.1.3 Uninstalling setuptools-46.1.3: Successfully uninstalled setuptools-46.1.3 Successfully installed setuptools-46.4.0

Try this command “CFLAGS=-stdlib=libc++ pip3 install rasa” . It worked and solution was from page where someone had similar issue error: command 'g++' failed with exit status 1 (during installation) · Issue #7 · src-d/tmsc · GitHub

1 Like

Hi @asrinivas et @tyd

I have no idea how it worked, I just tried python3.7 -m pip install rasa before trying Ajay’s command. And surprisingly the usual way worked !! :man_shrugging:t4:

Thanks for looking into it!! I would like to have known the actual root cause, but hey I will take the dub ha ha.

I got this error too, but I noticed that there was also an error before this one, which said-

‘Microsoft Visual C++ 14.0 is required.’

This involved downloading Visual Studio Build Tools, easily available on the VS website. Once I did this, both errors disappeared.

i had the same problem, with python 3.7.6 but my problem came from “xcrun: error”, and it was solved using ``` xcode-select --install

In the meantime, I’ve written an unofficial guide that might help. Full description can be found on the forum here: