iqbal-lab-org / gramtools

Genome inference from a population reference graph
MIT License
92 stars 15 forks source link

Error Installing gramtools #157

Closed mezewudo closed 3 years ago

mezewudo commented 3 years ago

I am trying to install the current version of gramtools on my Centos8 server using this command from the manual:

pip install git+https://github.com/iqbal-lab-org/gramtools

It builds for a while an throws up errors listed below:

ERROR: cannot verify d29vzk4ow07wi7.cloudfront.net's certificate, .... Self-signed certificate encountered. To connect to d29vzk4ow07wi7.cloudfront.net insecurely, use `--no-check-certificate'. make[3]: [libgramtools/CMakeFiles/boost.dir/build.make:91: libgramtools/boost-prefix/src/boost-stamp/boost-download] Error 5 make[2]: [CMakeFiles/Makefile2:140: libgramtools/CMakeFiles/boost.dir/all] Error 2 make[1]: [CMakeFiles/Makefile2:115: libgramtools/CMakeFiles/gram.dir/rule] Error 2 make: [Makefile:129: gram] Error 2 ERROR: gramtools backend compilation returned: 2

ERROR: Command errored out with exit status 255: /home/mezewudo/miniconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-dpjkuyo5/setup.py'"'"'; file='"'"'/tmp/pip-req-build-dpjkuyo5/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-e0j8mggv/install-record.txt --single-version-externally-managed --compile --install-headers /home/mezewudo/miniconda3/include/python3.7m/gramtools Check the logs for full command output.

It seems there is issues accessing a needed webpage, could you suggest possible options of dealing with this error.

Thanks.

bricoletc commented 3 years ago

Hello, thanks for reporting.

I've not seen this before, looks like installation process is not able to download the boost library dependency.

Have you tried i)using the container or ii)Trying to install the prebuilt binary (using the latest version release, as per the manual)? Recommending i) first. Or do you need the bleeding edge tip of master?

mezewudo commented 3 years ago

I tried installing, using the container as described in the manual and got to this point:

gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/home/mezewudo/clockwork-0.9.0/Clock/clockwork/gram_ve/include -I/usr/include/python3.6m -c bitarray/_bitarray.c -o build/temp.linux-x86_64-3.6/bitarray/_bitarray.o bitarray/_bitarray.c:12:10: fatal error: Python.h: No such file or directory

include "Python.h"

Seems some library is missing.

bricoletc commented 3 years ago

Hello, could you paste exactly what you ran on command-line? Running the container, via docker or singularity, should not be installing or compiling anything.

mezewudo commented 3 years ago

Yes, it is possible I am doing it wrong. I am assuming the gram_ve environment is where you mean for me to run. Anyways what I did below in 2 steps.

First: python3 -m venv gram_ve && source gram_ve/bin/activate

Then: pip install git+https://github.com/iqbal-lab-org/gramtools

bricoletc commented 3 years ago

Ah, indeed, in that case looks like your machine is missing the python development libraries (https://stackoverflow.com/questions/21530577/fatal-error-python-h-no-such-file-or-directory)

But for guaranteed working, I would recommend installing docker or singularity and running the container, as that is designed to run regardless of what libraries are installed on your machine.

mezewudo commented 3 years ago

Fair enough it runs in singularity. But the issue I have is I need to use gramtools as a depency in another tool yur lab developed --clockwork. And part of clockwork installation requires gramtools installation which has continued to fail, hence I decided to just install gramtools on its own to see what happens. So I need to install without the container.

I followed the troubleshoot you referenced above to install the python development libraries, and the installation went far up to this point where it seems something else in missing but not quite sure what:

Tests in the test-directory A cheat sheet in the extras/cheatsheet-directory. Have fun! [ 31%] No install step for 'sdsl' [ 33%] No test step for 'sdsl' [ 34%] Completed 'sdsl' [ 34%] Built target sdsl make[1]: [CMakeFiles/Makefile2:115: libgramtools/CMakeFiles/gram.dir/rule] Error 2 make: [Makefile:129: gram] Error 2 ERROR: gramtools backend compilation returned: 2

----------------------------------------

Command "/usr/bin/python3.6 -u -c "import setuptools, tokenize;file='/tmp/pip-sw8nufse-build/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-6fzt2lg1-record/install-record.txt --single-version-externally-managed --compile" failed with error code 255 in /tmp/pip-sw8nufse-build/

iqbal-lab commented 3 years ago

I think you should raise this as a clockwork issue then, its not really a gramtools problem

mezewudo commented 3 years ago

ok