bacpop / unitig-caller

Methods to determine sequence element (unitig) presence/absence
Apache License 2.0
18 stars 3 forks source link

Missing CmakeList pip install #4

Open rickbeeloo opened 4 years ago

rickbeeloo commented 4 years ago

pip install unitig-caller:

Gives;

ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-n2vbq5l2/unitig-caller/setup.py'"'"'; __file__='"'"'/tmp/pip-install-n2vbq5l2/unitig-caller/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-tepzrcir/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/rickb/.local/include/python3.8/unitig-caller
         cwd: /tmp/pip-install-n2vbq5l2/unitig-caller/
    Complete output (46 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.8
    creating build/lib.linux-x86_64-3.8/unitig_caller
    copying unitig_caller/squeakr.py -> build/lib.linux-x86_64-3.8/unitig_caller
    copying unitig_caller/__init__.py -> build/lib.linux-x86_64-3.8/unitig_caller
    copying unitig_caller/mantis.py -> build/lib.linux-x86_64-3.8/unitig_caller
    copying unitig_caller/__main__.py -> build/lib.linux-x86_64-3.8/unitig_caller
    running build_ext
    CMake Error: The source directory "/tmp/pip-install-n2vbq5l2/unitig-caller" does not appear to contain CMakeLists.txt.
    Specify --help for usage, or press the help button on the CMake GUI.
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-n2vbq5l2/unitig-caller/setup.py", line 81, in <module>
        setup(
      File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 144, in setup
        return distutils.core.setup(**attrs)
      File "/usr/lib/python3.8/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/usr/lib/python3.8/distutils/dist.py", line 966, in run_commands
        self.run_command(cmd)
      File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/usr/lib/python3/dist-packages/setuptools/command/install.py", line 61, in run
        return orig.install.run(self)
      File "/usr/lib/python3.8/distutils/command/install.py", line 589, in run
        self.run_command('build')
      File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/usr/lib/python3.8/distutils/command/build.py", line 135, in run
        self.run_command(cmd_name)
      File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/tmp/pip-install-n2vbq5l2/unitig-caller/setup.py", line 49, in run
        self.build_extension(ext)
      File "/tmp/pip-install-n2vbq5l2/unitig-caller/setup.py", line 73, in build_extension
        subprocess.check_call(['cmake', ext.sourcedir] + cmake_args, cwd=self.build_temp, env=env)
      File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
        raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command '['cmake', '/tmp/pip-install-n2vbq5l2/unitig-caller', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/tmp/pip-install-n2vbq5l2/unitig-caller/build/lib.linux-x86_64-3.8', '-DPYTHON_EXECUTABLE=/usr/bin/python3', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1.
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-n2vbq5l2/unitig-caller/setup.py'"'"'; __file__='"'"'/tmp/pip-install-n2vbq5l2/unitig-caller/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-tepzrcir/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/rickb/.local/include/python3.8/unitig-caller Check the logs for full command output.

So the error seems to be CMake Error: The source directory "/tmp/pip-install-n2vbq5l2/unitig-caller" does not appear to contain CMakeLists.txt. The bioconda installation works fine though

johnlees commented 4 years ago

Sorry about this, I'd generally focused on conda and forgotten that pip was still supported too. I have just updated the version on PyPI to the current v1.1.0. Let me know if this fixes the issue

MartaMatu commented 3 years ago

Is still not working. Could you fix the issue?

MartaMatu commented 3 years ago

Same error as previously identified in pip install. When building from source

Screenshot 2021-06-24 at 19 14 02

When building from source the following error apears even so I have the SeqAn3

Screenshot 2021-06-24 at 19 15 12

When using through python unitig_caller-runner.py

Screenshot 2021-06-24 at 19 42 09

I would really appreciate if you could suggest anything, Thanks

johnlees commented 3 years ago

Hi, I think the pip installation method must have stopped working when we added seqan3 as a dependency rather than as a submodule. I am going to remove it from the install instructions now, as talking with @samhorsfield96 it seems like it's difficult to get CMake to find Seqan3 in general circumstances.

Is there a reason why the conda install doesn't work for you?

As an alternative building from source with python setup.py install (which I assume is what you're running above) is the way to go. I still prefer to install the dependencies with conda before doing this: conda install pybind11 zlib bzip2 bifrost seqan3 pthread-stubs cmake python pip

If you are unable to use conda at all, but have seqan3 installed elsewhere, I think you will have to modify these lines in the CMakeLists.txt to something like:

find_path(SEQAN3_CLONE_DIR name bin PATHS "seqan3_install_dir" NO_DEFAULT_PATH)
find_path(SEQAN3_INCLUDE_DIR name seqan PATHS ${SEQAN3_CLONE_DIR}/include NO_DEFAULT_PATH)
find_path(SEQAN3_SUBMODULES_DIR name submodules PATHS ${SEQAN3_INCLUDE_DIR}/seqan3 NO_DEFAULT_PATH)