Search code examples
pythoninstallationchatterbot

Error in installing dependencies of spacy


Using cached spacy-2.1.8.tar.gz (30.7 MB)

Installing build dependencies ...error

why this type of error, I reinstalled the latest Python and directly try installing chatterbot by using pip install chatterbot.


Solution

  • Use anaconda. Miniconda has a much smaller footprint than Anaconda. I would suggest installing miniconda.

    Install Miniaconda on your system from here. For instance if you are on linux, you could install miniconda using command as shown here.

    Then create a new environment and install the necessary libraries as follows:

    # Create and activate an environment by the name (nlp_env)
    conda create -n nlp_env python=3.8 -yq
    conda activate nlp_env
    
    # Install spacy from conda-forge channel
    conda install spacy -c conda-forge -y
    
    # Install chatterbot
    pip install chatterbot
    pip install chatterbot-corpus
    

    References