giesselmann / STRique

Nanopore raw signal repeat detection pipeline
MIT License
45 stars 10 forks source link

ImportError: cannot import name 'pyseqan' from 'STRique_lib' #24

Closed sabiqali closed 3 years ago

sabiqali commented 3 years ago

Hi, I was trying to install STRique on my cluster and I ran into some problems, I was hoping they could be solved in this.

I went through all the steps in this document that has been provided on read the docs. https://strique.readthedocs.io/en/latest/installation/src/ The installation went through without any error messages being emitted and I did get the message that it had finished processing all the dependencies of STRique.

But when I moved on to the test page to test the installation. I followed the steps on this page: https://strique.readthedocs.io/en/latest/installation/test/

I ran into problems on the second line. namely python3 scripts/STRique_test.py

The error that I get is the following. Traceback (most recent call last): File "scripts/STRique_test.py", line 39, in <module> import STRique File "/.mounts/labs/simpsonlab/users/schaudhary/projects/2020.11.STRDetection/STRique/scripts/STRique.py", line 49, in <module> from STRique_lib import fast5Index, pyseqan ImportError: cannot import name 'pyseqan' from 'STRique_lib' (/path/to/directory/STRique/STRique_lib/__init__.py)

Would you happen to know how to get past this?

Thank you.

giesselmann commented 3 years ago

Hi,

The error tells that the seqan submodule was not build, can you confirm that you cloned with --recursive by checking if the submodule folder contains a 'seqan' subfolder? Can you please also confirm, that you ran both commands:

pip3 install -r requirements.txt python3 setup.py install

The second one is building the C++ extension, what happens if you (re-)run the commands, could you post the full output please?

Lastly, are the python3/pip from the installation the same active virtual environment as in the test? Since the travis build in the repository is quite old, I quickly checked the commands from the docs and they build in an ubuntu 18.04 virtual machine.

Pay

sabiqali commented 3 years ago

Hi,

Yes, I can confirm that the submodule folder contains a 'seqan' subfolder and that I have run both the commands.

I just did a rerun on the installation scripts and the results are the same error message when running the test module.

I am attaching the file with the output to python3 setup install

I do believe that they are using the same virtual env that I created specifically for the task.

output.txt

giesselmann commented 3 years ago

Hi, the output looks fine,

[100%] Built target pyseqan

shows the successful build of the extension. I seems like the package is installed to some location, but not found by the python import mechanics. I was wondering if the STRique folder nested into the virtual env is a problem, but even that works here on my machine. I'm failing to reproduce the issue. Do you have the chance to check the installation on any other virtual/private linux machine?

Pay

sabiqali commented 3 years ago

Hi,

So, I managed to get the version to work.

As far as I cant understand, I had to do two things to be able to get it to work. I had to:

  1. Create a python env with python3.5 or python3.6 and not newer.
  2. Make sure my python path was clear.

With these two changes, I managed to get it to work on my cluster enviroment.

Thank you for your time.

Sabiq