-1

I am getting an error in a Colab notebook while installing from a requirements.txt file for a speech emotion recognition library.

First of all, I am cloning the Github project for speech emotion recognition:

git clone https://github.com/marcogdepinto/Django-Emotion-Classification-Ravdess-API.git

Then installing the requirements using the following code

%pip install utils
%cd /content/Django-Emotion-Classification-Ravdess-API
%pip install -r requirements.txt

Then the following error is displayed:

ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

I have searched everywhere but couldn't find any solution.

Gino Mempin
  • 12,644
  • 19
  • 50
  • 69
Hassan Askary
  • 11
  • 1
  • 2
  • 1
    what version of python are you using?egg_info is a structure used by setup tools that details information about a software package. Usually egg_info errors mean that you have problems with or are missing dependencies. – Zrufy Jan 30 '20 at 11:06
  • python 3.6 i am using. i am a beginer and didnot know too much coding in python. speech emotion recognition project i am making for my final year project and facing these difficulties. – Hassan Askary Jan 30 '20 at 11:18
  • Have you write this command with special characters?Write this command without special characters.On first write pip install utils.Wait installing.After write this cd /content/Django-Emotion-Classification-Ravdess-API.When you are inside the folder Django-Emotion-Classification-Ravdess-API write pip install -r requirements.txt. – Zrufy Jan 30 '20 at 11:34
  • what os are you using?Windows,Ubuntu? – Zrufy Jan 30 '20 at 11:39
  • i am working on window 10 – Hassan Askary Jan 30 '20 at 11:47
  • have you tried the first i write? – Zrufy Jan 30 '20 at 11:48
  • i did same as you told but still the error is the same – Hassan Askary Jan 30 '20 at 11:50
  • plz help me dear m very stressed. – Hassan Askary Jan 30 '20 at 11:51

1 Answers1

1

You have no choice here, you need to see the logs or a more verbose pip install output.

Try the verbose pip option:

!pip install -vvv -r requirements.txt

At the end of that loooong error message, you'll see the actual problem:

Error: pg_config executable not found.

    pg_config is required to build psycopg2 from source.  Please add the directory
    containing pg_config to the $PATH or specify the full executable path with the
    option:

        python setup.py build_ext --pg-config /path/to/pg_config build ...

    or with the pg_config option in 'setup.cfg'.

    If you prefer to avoid building psycopg2 from source, please install the PyPI
    'psycopg2-binary' package instead.

    For further information please check the 'doc/src/install.rst' file (also at
    <http://initd.org/psycopg/docs/install.html>).

You need to install pg_config.

This related post (pg_config executable not found) gives options how to do that based on the platform. Since Google Colab runs on a Linux/Ubuntu-based OS:

!apt install libpq-dev

Note the ! instead of %.

Test it:

!pg_config --version
PostgreSQL 10.10 (Ubuntu 10.10-0ubuntu0.18.04.1)

Then repeat the installation:

%pip install -r requirements.txt

Google Colab will require you to restart the runtime after the installation completes. Do so. Then you may do the installation again just to confirm that "Requirement already satisfied:".

Do take note that while the installation succeeds, there are some warnings that that Django-Emotion-Classification-Ravdess-API may require packages (in requirements.txt) that are not compatible with Colab's pre-install libraries.

Gino Mempin
  • 12,644
  • 19
  • 50
  • 69