TODO: maybe use conda as python package

def install_pkgs(self, offline=False):
        """
        TODO: maybe use conda as python package
        """
        if not offline and self.pkgs:
            self.logger.info("Installing conda packages ...")
            cmd = [join(self.anaconda_home, 'bin', 'conda')]
            cmd.append('install')
            # if offline:
            #     cmd.append('--offline')
            #     self.logger.info("... offline mode ...")
            if not self.newest:
                cmd.append('--no-update-deps')
                self.logger.info("... no update dependencies ...")
            if self.env:
                self.logger.info("... in conda environment %s ...", self.env)
                cmd.extend(['-n', self.env])
            cmd.append('--yes')
            if self.no_pin:
                cmd.append('--no-pin')
                self.logger.info("... no pin ...")
            if self.channel_priority:
                self.logger.info("... channel priority ...")
                cmd.append('--channel-priority')
            if self.channels:
                if self.override_channels:
                    self.logger.info('... override channels ...')
                    cmd.append('--override-channels')
                self.logger.info("... with conda channels: %s ...",
                                 ', '.join(self.channels))
                for channel in self.channels:
                    cmd.append('-c')
                    cmd.append(channel)
            cmd.extend(self.pkgs)
            try:
                self.logger.debug("install_pkgs cmd: %s", cmd)
                check_call(cmd)
            except CalledProcessError as err:
                self.logger.error("Conda exited with errors: %s", err.output)
        return self.pkgs