schneebergerlab / syri

Synteny and Rearrangement Identifier
https://schneebergerlab.github.io/syri/
MIT License
303 stars 36 forks source link

Can't install on Ubuntu 22.04 #228

Closed asishallab closed 7 months ago

asishallab commented 7 months ago

Dear developers of SyRi,

congratulations for creating such a useful tool as SyRi.

However, we are having problems installing it on latest Ubuntu 22.04. Using the recommended conda method:

conda create -n syri_env -c bioconda syri

causes the following error:

UnsatisfiableError: The following specifications were found to be incompatible with your system:

  - feature:/linux-64::__glibc==2.35=0
  - syri -> libgcc-ng[version='>=10.3.0'] -> __glibc[version='>=2.17']

Your installed version is: 2.35

Unfortunately, using the alternative installer,

sudo python3 setup.py install

an error is also generated:

/usr/lib/python3/dist-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
/usr/lib/python3/dist-packages/setuptools/command/easy_install.py:158: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
running bdist_egg
running egg_info
writing syri.egg-info/PKG-INFO
writing dependency_links to syri.egg-info/dependency_links.txt
writing top-level names to syri.egg-info/top_level.txt
reading manifest file 'syri.egg-info/SOURCES.txt'
adding license file 'LICENSE'
writing manifest file 'syri.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
running build_ext
building 'syri.inversions' extension
x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/local/lib/python3.10/dist-packages/numpy/core/include -I/usr/include/python3.10 -c syri/pyxFiles/inversions.cpp -o build/temp.linux-x86_64-3.10/syri/pyxFiles/inversions.o
In file included from /usr/local/lib/python3.10/dist-packages/numpy/core/include/numpy/ndarraytypes.h:1929,
                 from /usr/local/lib/python3.10/dist-packages/numpy/core/include/numpy/ndarrayobject.h:12,
                 from /usr/local/lib/python3.10/dist-packages/numpy/core/include/numpy/arrayobject.h:5,
                 from syri/pyxFiles/inversions.cpp:1238:
/usr/local/lib/python3.10/dist-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]
   17 | #warning "Using deprecated NumPy API, disable it with " \
      |  ^~~~~~~
In file included from /usr/include/python3.10/Python.h:7,
                 from syri/pyxFiles/inversions.cpp:30:
syri/pyxFiles/inversions.cpp: In function ‘int __pyx_import_star_set(PyObject*, PyObject*, char*)’:
/usr/include/python3.10/patchlevel.h:19:33: error: lvalue required as left operand of assignment
   19 | #define PY_MAJOR_VERSION        3
      |                                 ^
syri/pyxFiles/inversions.cpp:39076:5: note: in expansion of macro ‘PY_MAJOR_VERSION’
39076 |     PY_MAJOR_VERSION = __Pyx_PyInt_As_int(o); if (unlikely((PY_MAJOR_VERSION == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 203, __pyx_L2_error)
      |     ^~~~~~~~~~~~~~~~
error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1

Could you please help?

Thank you and kind regards!

mnshgl0110 commented 7 months ago

Hi. This issue has been reported (https://github.com/schneebergerlab/syri/issues/212) and seems to be arising because of how newer cython version works. The suggested solution is to use an older version of cython (<=0.29.36) and then trying to compile syri. Could you please try that?

asishallab commented 7 months ago

Dear @mnshgl0110 ,

your suggestion worked. For anyone, encountering the same issue, run:

pip install 'Cython<=0.29.36'

and then the recommended alternative installation method (see Readme):

python setup.py install

Please note, that we ran both commands as root using sudo.

Hope that helps.

Thanks and Cheers!