def install_requirements(self):
        """Install Ubuntu Requirements"""
        print('Installing Requirements')
        print(platform.dist())
        if platform.dist()[0] in ['Ubuntu', 'LinuxMint']:
            command = 'sudo apt-get install -y gcc git python3-dev zlib1g-dev make zip libssl-dev libbz2-dev liblzma-dev libcurl4-openssl-dev build-essential libxml2-dev apache2 zlib1g-dev bcftools build-essential cpanminus curl git libbz2-dev libcurl4-openssl-dev liblocal-lib-perl liblzma-dev libmysqlclient-dev libpng-dev libpq-dev libssl-dev manpages mysql-client openssl perl perl-base pkg-config python3-dev python3-pip python3-setuptools sed tabix unzip vcftools vim wget zlib1g-dev apache2 build-essential cpanminus curl git libmysqlclient-dev libpng-dev libssl-dev locales manpages mysql-client openssl perl perl-base unzip vim wget libgd-dev'  # lamp-server^
            sts = call(command, shell=True)

            try:
                subprocess.call(['java', '-version'])
            except:

                command = """sudo apt install -y software-properties-common
                       sudo add-apt-repository -y ppa:webupd8team/java
                       sudo apt-get update
                       echo "oracle-java8-installer shared/accepted-oracle-license-v1-1 select true" | sudo debconf-set-selections
                       sudo apt-get -y install oracle-java8-installer"""

                sts = call(command, shell=True)
        elif platform.dist()[0] in ['debian']:
            command = 'sudo apt-get update'
            sts = call(command, shell=True)

            command = 'sudo apt-get install -y libmodule-install-perl apache2 bcftools build-essential cpanminus curl git libbz2-dev libcurl4-openssl-dev liblocal-lib-perl liblzma-dev default-libmysqlclient-dev libpng-dev libpq-dev libssl-dev manpages mysql-client openssl perl perl-base pkg-config python3-dev python3-pip python3-setuptools sed tabix unzip vcftools vim wget zlib1g-dev apache2 build-essential cpanminus curl git libpng-dev libssl-dev locales manpages mysql-client openssl perl perl-base unzip vim wget libgd-dev libxml-libxml-perl libgd-dev'  # lamp-server^
            sts = call(command, shell=True)
            command = 'sudo apt-get install -y default-jre default-jdk'
            sts = call(command, shell=True)
        
        elif platform.dist()[0] in ['redhat', 'centos']:

            command = 'sudo yum install libcurl-devel sed vcftools bcftools tabix zlib-devel postgresql96-libs perl-local-lib perl-App-cpanminus curl unzip wget'
            sts = call(command, shell=True)
            command = """sudo yum groupinstall 'Development Tools'"""
            sts = call(command, shell=True)
            command = """sudo yum install gcc gcc-c++ make openssl-devel"""
            sts = call(command, shell=True)

            try:
                subprocess.call(['java', '-version'])
            except:
                command = "sudo yum install -y java-1.8.0-openjdk"
                sts = call(command, shell=True)
        # Perl Requirements
        command = "sudo cpanm DBI DBD::mysql File::Copy::Recursive Archive::Extract Archive::Zip LWP::Simple Bio::Root::Version LWP::Protocol::https Bio::DB::Fasta CGI Test::utf8 Test::File inc::Module::Install XML::DOM::XPath XML::LibXML"
        sts = call(command, shell=True)
        command = "sudo cpanm --local-lib=~/perl5 local::lib && eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib)"
        sts = call(command, shell=True)
def install_requirements ( self ) : print ( 'Installing Requirements' ) print ( platform . dist ( ) ) if platform . dist ( ) [ 0 ] in [ 'Ubuntu' , 'LinuxMint' ] : command = 'sudo apt-get install -y gcc git python3-dev zlib1g-dev make zip libssl-dev libbz2-dev liblzma-dev libcurl4-openssl-dev build-essential libxml2-dev apache2 zlib1g-dev bcftools build-essential cpanminus curl git libbz2-dev libcurl4-openssl-dev liblocal-lib-perl liblzma-dev libmysqlclient-dev libpng-dev libpq-dev libssl-dev manpages mysql-client openssl perl perl-base pkg-config python3-dev python3-pip python3-setuptools sed tabix unzip vcftools vim wget zlib1g-dev apache2 build-essential cpanminus curl git libmysqlclient-dev libpng-dev libssl-dev locales manpages mysql-client openssl perl perl-base unzip vim wget libgd-dev' sts = call ( command , shell = True ) try : subprocess . call ( [ 'java' , '-version' ] ) except : command = """sudo apt install -y software-properties-common
                       sudo add-apt-repository -y ppa:webupd8team/java
                       sudo apt-get update
                       echo "oracle-java8-installer shared/accepted-oracle-license-v1-1 select true" | sudo debconf-set-selections
                       sudo apt-get -y install oracle-java8-installer""" sts = call ( command , shell = True ) elif platform . dist ( ) [ 0 ] in [ 'debian' ] : command = 'sudo apt-get update' sts = call ( command , shell = True ) command = 'sudo apt-get install -y libmodule-install-perl apache2 bcftools build-essential cpanminus curl git libbz2-dev libcurl4-openssl-dev liblocal-lib-perl liblzma-dev default-libmysqlclient-dev libpng-dev libpq-dev libssl-dev manpages mysql-client openssl perl perl-base pkg-config python3-dev python3-pip python3-setuptools sed tabix unzip vcftools vim wget zlib1g-dev apache2 build-essential cpanminus curl git libpng-dev libssl-dev locales manpages mysql-client openssl perl perl-base unzip vim wget libgd-dev libxml-libxml-perl libgd-dev' sts = call ( command , shell = True ) command = 'sudo apt-get install -y default-jre default-jdk' sts = call ( command , shell = True ) elif platform . dist ( ) [ 0 ] in [ 'redhat' , 'centos' ] : command = 'sudo yum install libcurl-devel sed vcftools bcftools tabix zlib-devel postgresql96-libs perl-local-lib perl-App-cpanminus curl unzip wget' sts = call ( command , shell = True ) command = """sudo yum groupinstall 'Development Tools'""" sts = call ( command , shell = True ) command = """sudo yum install gcc gcc-c++ make openssl-devel""" sts = call ( command , shell = True ) try : subprocess . call ( [ 'java' , '-version' ] ) except : command = "sudo yum install -y java-1.8.0-openjdk" sts = call ( command , shell = True ) command = "sudo cpanm DBI DBD::mysql File::Copy::Recursive Archive::Extract Archive::Zip LWP::Simple Bio::Root::Version LWP::Protocol::https Bio::DB::Fasta CGI Test::utf8 Test::File inc::Module::Install XML::DOM::XPath XML::LibXML" sts = call ( command , shell = True ) command = "sudo cpanm --local-lib=~/perl5 local::lib && eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib)" sts = call ( command , shell = True )
Install Ubuntu Requirements