GWW / scsnv

scSNV Mapping tool for 10X Single Cell Data
MIT License
22 stars 4 forks source link

multiple errors when running this step "python setup.py install" #27

Closed monoplasty closed 1 year ago

monoplasty commented 1 year ago

When I run python setup.py install on a centos8 machine, the following error occurs.

In file included from /data/miniconda3/envs/py38/lib/python3.8/site-packages/numpy/core/include/numpy/ndarraytypes.h:1940,
                 from /data/miniconda3/envs/py38/lib/python3.8/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
                 from /data/miniconda3/envs/py38/lib/python3.8/site-packages/numpy/core/include/numpy/arrayobject.h:5,
                 from cyvcf2/cyvcf2.c:842:
/data/miniconda3/envs/py38/lib/python3.8/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
 #warning "Using deprecated NumPy API, disable it with " \
  ^~~~~~~
cyvcf2/cyvcf2.c: In function ‘__pyx_pf_6cyvcf2_6cyvcf2_3VCF_8seqnames___get__’:
cyvcf2/cyvcf2.c:14573:18: warning: assignment to ‘char **’ from incompatible pointer type ‘const char **’ [-Wincompatible-pointer-types]
   __pyx_v_cnames = bcf_hdr_seqnames(__pyx_v_self->hdr, (&__pyx_v_n));
                  ^
cyvcf2/cyvcf2.c:14682:22: warning: assignment to ‘char **’ from incompatible pointer type ‘const char **’ [-Wincompatible-pointer-types]
       __pyx_v_cnames = bcf_index_seqnames(__pyx_v_self->hidx, __pyx_v_self->hdr, (&__pyx_v_n));
                      ^
cyvcf2/cyvcf2.c:14765:22: warning: assignment to ‘char **’ from incompatible pointer type ‘const char **’ [-Wincompatible-pointer-types]
       __pyx_v_cnames = tbx_seqnames(__pyx_v_self->idx, (&__pyx_v_n));
                      ^
cyvcf2/helpers.c: In function ‘as_gts’:
cyvcf2/helpers.c:7:21: warning: variable ‘found’ set but not used [-Wunused-but-set-variable]
     int missing= 0, found=0;
                     ^~~~~
htslib/cram/cram_codecs.c:54:10: fatal error: ../htscodecs/htscodecs/varint.h: No such file or directory
 #include "../htscodecs/htscodecs/varint.h"
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
error: Setup script exited with error: command '/usr/bin/gcc' failed with exit code 1

However, I have downloaded the htscodecs(https://github.com/samtools/htscodecs)[https://github.com/samtools/htscodecs] project to the htslib directory, but this path error still occurs.

my envs:

Python                 3.8.16
cython                 0.29.34 
ncls                      0.0.66  

So I changed to a centos7 machine, but an error also occurred during the make step. It took me 2 days, and I still haven't compiled it yet. feel very frustrated. Could you please give me some suggestions? Thanks for your help.

GWW commented 1 year ago

Hi,

I apologize that you are having issues getting this working. I know it can be frustrating.

The problem is not with scsnv but with a required python package. I have had success getting it to work by using pip install cyvcf2 ncls, instead of using the setuptools requirement installation.

The problem could be that your numpy version has depreciated an API that cyvcf2 required. I am currently using NumPy v1.20.3 and v1.24.2 with no issue.