pythondockerpython-poetrycontrast

Unable to install Contrast-agent package on Poetry


Getting the below error when I install contrast package using poetry install command:

RuntimeError: Failed to build Contrast C extension. It is necessary for autotools (autoconf, automake) to be installed in order for Contrast to build properly. On lightweight systems such as Alpine, it may be necessary to install linux-headers if they are not available already. Some other systems may require "build essential" packages to be installed.

Can someone help me how to fix this issue ?


Solution

  • I was able to fix this issue by using the below commands since I was running this on Ubuntu the below commands fixed the issue for me. Once these commands were run I was able to add contrast-agent in poetry and then poetry install ran successfully for me

    apt update
    apt upgrade -y
    apt install linux-libc-dev
    apt-get install autoconf -y
    apt-get install automake 
    apt-get install build-essential -y