2

I am trying to install rasa on Windows 10. I have installed Python 3.6 & pip. When I am running pip install rasa_nlu I am getting the following error:

c:\program files (x86)\python36-32\include\pyconfig.h(222): fatal error C1083: Cannot open include file: 'basetsd.h': No such file or directory

error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\cl.exe' failed with exit status 2

I have tried most of the solutions like reinstalling Microsoft redistributables, installing build tools etc. but none of them worked.

bh7781
  • 33
  • 1
  • 1
  • 9
  • 1
    Looks like you need Microsoft Visual Studio for this install. Can you check if you have `C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\cl.exe` installed and in the path? – Anil_M Oct 12 '17 at 15:45
  • For users looking to install RASA now can simply run `pip install rasa` Both the NLU and Core are installed together now. – Prometheus Apr 10 '20 at 12:53

3 Answers3

5

I also faced the similar issue. Here's how I resolved it:

For a clean install of RASA NLU on a Windows machine with all other dependencies, I followed the following steps:

While installing Anaconda in: C:\Anaconda3, because installing it in C:\ProgramData\Anaconda3 would cause some Folder Lock problem while installing some pip packages.

enter image description here

Install JDK and JRE both and set the JAVA_HOME environment variable as JVM is required for the Duckling Date Parser needed by RASA NLU.

enter image description here

Next, install the following packages in this order in administrative mode in Anaconda 3 command prompt:

  • Spacypip install -U spacy
  • Spacy Large English language model - python -m spacy download en_core_web_lg
  • Link the model now: python -m spacy link en_core_web_lg en

  • Fallback if the above fails: If your network is blocking it, or is too slow to download the above model, fallback by downloading it directly from its GitHub repo extract the tar.gz using 7z and do python setup.py install by navigating into the directory.

  • Scikitpip install -U scikit-learn

  • Numpypip install -U numpy
  • Scipy Packagepip install -U scipy
  • Sklearnpip install -U sklearn-crfsuite
  • Ducklingpip install -U duckling
  • Tensorflow as a component - pip install -U tensorflow
  • Latest version of RASA NLUpip install -U rasa_nlu

Check if RASA installed or not by pasting the following command in Anaconda command prompt:

python -c "import rasa_nlu; print(rasa_nlu.__version__);"

Kunal Mukherjee
  • 5,775
  • 3
  • 25
  • 53
2

Short Answer:

Use a pre-compiled wheel bundle for the dependency failing to install. (This is an unofficial source so use at your own risk) Download here and do

pip install /path/to/bundle.whl

Long Answer:

I faced a similar problem while installing rasa_nlu and this is how I resolved it.

The major problem was in installing the Twisted package. I had tried installing redistributables and build tools and my final error looked like this-

c:\program files\python36\include\pyconfig.h(59): fatal error C1083: Cannot open include file: 'io.h': No such file or directory

    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\VC\\Tools\\MSVC\\14.11.25503\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2

I then decided to follow the answer here which describes ways to handle python library installations in a fallback approach.

My final resolution was downloading the twisted wheel from the source mentioned above, install the package and continue with rasa installation.

pip install ./Twisted-17.9.0-cp36-cp36m-win_amd64.whl
pip install rasa_nlu

Note:

If you are really skeptic in using an unofficial source, follow the instructions in SF answer I shared earlier to build your own bundle and use that wheel for installation.

Saket
  • 124
  • 9
0

To this date In order to have rasa (and tensorflow) working on your windows machine :

you need to lower your python version at least to python 3.6 you need to lower your python-dateutil to at least 2.8.0 Steps Assuming that you already have PIP, Virtualenv installed, you must follow these steps:

Python older version: In order to install it, download an older version of python (i found one here )

Create a virtual env using that python version you have just installed. using the command mkvirtualenv --python=path_of_python_older_version\ name_of_env

Activate the env you have just created (WORKON name_of_env)

Now install an older version of python-dateutil using the command pip install python-dateutil==2.8.0

Now you can install rasa,using the command pip install rasa

Hope it helps

Eden
  • 76
  • 3