pip install rasa-nlu
Collecting rasa-nlu
Using cached rasa_nlu-0.15.1-py3-none-any.whl (147 kB)
Collecting cloudpickle~=0.6.1 (from rasa-nlu)
Using cached cloudpickle-0.6.1-py2.py3-none-any.whl (14 kB)
Collecting gevent~=1.3 (from rasa-nlu)
Using cached gevent-1.5.0.tar.gz (5.3 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [318 lines of output]
.
.
.
Error compiling Cython file:
------------------------------------------------------------
...
if events & ~(libev.EV__IOFDSET | libev.EV_READ | libev.EV_WRITE):
raise ValueError('illegal event mask: %r' % events)
# All the vfd_functions are no-ops on POSIX
cdef int vfd = libev.vfd_open(fd)
libev.ev_io_init(&self._watcher, <void *>gevent_callback_io, vfd, events)
self.__watcher = <libev.ev_watcher*>&self._watcher
^
------------------------------------------------------------
src\gevent\libev\corecext.pyx:1027:25: Cannot convert 'ev_watcher *' to Python object
Error compiling Cython file:
------------------------------------------------------------
...
raise ValueError('illegal event mask: %r' % events)
# All the vfd_functions are no-ops on POSIX
cdef int vfd = libev.vfd_open(fd)
libev.ev_io_init(&self._watcher, <void *>gevent_callback_io, vfd, events)
self.__watcher = <libev.ev_watcher*>&self._watcher
self.__ss = &io_ss
.
.
.
and many more
Seems to be a known issue (from a few years ago) caused by a particular gevent + Cython version:
You could try first updating Cython and gevent, then try to install rasa-nlu again.
Also, when running pip, it might be good to add --no-cache-dir
since what’s in your cache may be too old.
Problem could also be that (the Pipy-distributed) rasa-nlu is just too old (last release was 4 years ago - which means in today’s ML/NLU landscape it seems antique), which is bound to cause problems with dependencies. So, you really need to make sure you are running all of this in a special virtual Python env. Plus - make sure you only use a Python version that rasa-nlu explicitly says is supported, just to prevent problems.
Alternatively - do not install with pip install from the Pypi, but install rasa-nlu directly from the current source code in the GitHub. This will give you an up-to-date version.
It still errors the same, but given the age of rasa, perhaps I’ll look at an alternative package for NLU intent based processing. Thanks
Or look at the ‘rasa’ (not rasa-nlu) package first. Not sure how to two relate, but ‘rasa’ is being actively maintained: GitHub - RasaHQ/rasa: 💬 Open source machine learning framework to automate text- and voice-based conversations: NLU, dialogue management, connect to Slack, Facebook, and more - Create chatbots and voice assistants
Having taken a quick look, it seems ‘rasa/nlu’ is just a submodule of ‘rasa’, so the 'rasa` package is probably what you want.
Don’t know how familiar you are with other packages in this area, but you may also like the HuggingFace APIs: https://huggingface.co
This sounds suspiciously similar to this previous discussion: Getting requirements to build wheel did not run successfully exit code: 1
Indeed. Cython 3.0.2 did fix several issues but Cython 3 may not be compatible with some older extension module code.
To prevent these kind of issues, imo it would be good to always release wheels with pre-compiled dynamic link modules (also an ongoing discussion).