markmipt / biosaur2

Apache License 2.0
10 stars 4 forks source link

how to install the latest version? #14

Closed ATPs closed 5 months ago

ATPs commented 5 months ago

pip only have 0.2.16.

I tried, but cannot build the package locally. Always get:

python setup.py build
running build
running build_py
creating build
creating build/lib.linux-x86_64-cpython-39
creating build/lib.linux-x86_64-cpython-39/biosaur2
copying biosaur2/__init__.py -> build/lib.linux-x86_64-cpython-39/biosaur2
copying biosaur2/main_dia.py -> build/lib.linux-x86_64-cpython-39/biosaur2
copying biosaur2/main.py -> build/lib.linux-x86_64-cpython-39/biosaur2
copying biosaur2/utils.py -> build/lib.linux-x86_64-cpython-39/biosaur2
copying biosaur2/search.py -> build/lib.linux-x86_64-cpython-39/biosaur2
running build_ext
building 'biosaur2.cutils' extension
creating build/temp.linux-x86_64-cpython-39
creating build/temp.linux-x86_64-cpython-39/biosaur2
/data/p/anaconda3/bin/x86_64-conda-linux-gnu-cc -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /data/p/anaconda3/include -I/data/p/anaconda3/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /data/p/anaconda3/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /data/p/anaconda3/include -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /data/p/anaconda3/include -fPIC -I/data/p/anaconda3/lib/python3.9/site-packages/numpy/core/include -I/data/p/anaconda3/include/python3.9 -c biosaur2/cutils.c -o build/temp.linux-x86_64-cpython-39/biosaur2/cutils.o
In file included from /data/p/anaconda3/include/math.h:46,
                 from /data/p/anaconda3/include/python3.9/pyport.h:205,
                 from /data/p/anaconda3/include/python3.9/Python.h:50,
                 from biosaur2/cutils.c:38:
/data/p/anaconda3/include/bits/mathdef.h:19:3: error: #error "Never use <bits/mathdef.h> directly; include <complex.h> instead"
   19 | # error "Never use <bits/mathdef.h> directly; include <complex.h> instead"
      |   ^~~~~
In file included from /data/p/anaconda3/include/math.h:70,
                 from /data/p/anaconda3/include/python3.9/pyport.h:205,
                 from /data/p/anaconda3/include/python3.9/Python.h:50,
                 from biosaur2/cutils.c:38:
/data/p/anaconda3/include/bits/mathcalls.h:62:21: error: expected ')' before ',' token
   62 | __MATHCALL_VEC (cos,, (_Mdouble_ __x));
      |                     ^
      |                     )
/data/p/anaconda3/include/bits/mathcalls.h:64:21: error: expected ')' before ',' token
   64 | __MATHCALL_VEC (sin,, (_Mdouble_ __x));
      |                     ^
      |                     )
/data/p/anaconda3/include/bits/mathcalls.h:79:22: error: unknown type name 'sincos'
   79 | __MATHDECL_VEC (void,sincos,,
      |                      ^~~~~~
/data/p/anaconda3/include/bits/mathcalls.h:79:29: error: expected declaration specifiers or '...' before ',' token
   79 | __MATHDECL_VEC (void,sincos,,
      |                             ^
/data/p/anaconda3/include/bits/mathcalls.h:80:3: error: expected declaration specifiers or '...' before '(' token
   80 |   (_Mdouble_ __x, _Mdouble_ *__sinx, _Mdouble_ *__cosx));
      |   ^
/data/p/anaconda3/include/bits/mathcalls.h:95:21: error: expected ')' before ',' token
   95 | __MATHCALL_VEC (exp,, (_Mdouble_ __x));
      |                     ^
      |                     )
/data/p/anaconda3/include/bits/mathcalls.h:104:21: error: expected ')' before ',' token
  104 | __MATHCALL_VEC (log,, (_Mdouble_ __x));
markmipt commented 5 months ago

Dear Xiaolong,

It looks for me like some mismatches of compiler version for Cython. I'm not a specialist in that to provide the full help here, BUT: I've fixed automatic compilation and upload to PyPi. Could you please try to upgrade biosaur2 again using the pip? The latest version should be 0.2.213 now.

Regards, Mark

ATPs commented 5 months ago

Hi, Mark.

Thank you so much for your fantastic work! I just installed the latest version. Hope you all the best.

Cheers!

Xiaolong