在Linux Subsystem for Windows上为C程序安装python包装器时出现的问题

2024-06-09 07:25:44 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在尝试使用一个新的用C写的生物信息学程序,名为“傻笑”。它们包括一个python包装器。由于我使用的是windows10,大多数生物信息学的东西都只适用于Linux,所以我使用的是安装了python2的Linux子系统。包装器的安装如下:

git clone --recursive https://github.com/brentp/python-giggle
cd python-giggle
python setup.py test
python setup.py install

在运行setup.py test时,我遇到了各种我从未听说过的依赖关系,比如libbz2和liblzma。这些依赖项的安装在sudo apt-get install中运行得很好,但现在运行测试时,我得到了一长串警告,如下所示:

    lib/htslib/hfile_libcurl.c:187:13: warning: function declaration isn’t a 
        prototype [-Wstrict-prototypes]
        static void libcurl_exit()

这些都是针对不同的.h和.c文件的。列表结尾有几个错误:

    lib/htslib/hfile_s3.c:70:2: error: #error No HMAC() routine found by configure
 #error No HMAC() routine found by configure
  ^
lib/htslib/hfile_s3.c: In function ‘s3_rewrite’:
lib/htslib/hfile_s3.c:335:30: error: ‘DIGEST_BUFSIZ’ undeclared (first use in this function)
         unsigned char digest[DIGEST_BUFSIZ];
                              ^
lib/htslib/hfile_s3.c:335:30: note: each undeclared identifier is reported only once for each function it appears in
lib/htslib/hfile_s3.c:336:29: warning: implicit declaration of function ‘s3_sign’ [-Wimplicit-function-declaration]
         size_t digest_len = s3_sign(digest, &secret, &message);
                             ^
lib/htslib/hfile_s3.c:335:23: warning: unused variable ‘digest’ [-Wunused-variable]
         unsigned char digest[DIGEST_BUFSIZ];
                       ^
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

我有点迷路了,谷歌搜索错误并没有让我变得更聪明。我觉得这是一个'你仍然在使用windows'的问题。任何帮助都将不胜感激。你知道吗


Tags: pys3libsetup生物functionerror信息学