This is a test version of Biostars. For the public version, visit https://www.biostars.org.
HTSeq Import Error Re: Working vs Build Directory

Problem: I am trying to run a python3 script that imports HTSeq, but I have a conflict regarding the "build directory."

Background: I have set up a python3 conda environment on my Ubuntu virtual machine. I git cloned the python2 package, and pip installed the requirements.txt, yet when I go to run the python script I get the following error message:

Traceback (most recent call last):
  File "guideseq/guideseq.py", line 22, in <module>
    from umi import demultiplex, umitag, consolidate
  File "/home/james/Bioinformatics/softwares/guideseq/guideseq/umi/consolidate.py", line 6, in <module>
    import HTSeq
  File "/home/james/.local/lib/python2.7/site-packages/HTSeq/__init__.py", line 12, in <module>
    raise ImportError( "Cannot import 'HTSeq' when working directory is HTSeq's own build directory.")
ImportError: Cannot import 'HTSeq' when working directory is HTSeq's own build directory.

Attempted Solution I have tried uninstalling and reinstalling the required HTSeq version from this directory:

~/.local/lib/python2.7/site-packages/HTSeq

My search has not yielded any questions such as this. I hope I can please get some insight. Thank you!

Additional info: I was able to install the requirements. Traceback:

Installing collected packages: HTSeq, PyYAML, swalign, six, pyfaidx, pyparsing, svgwrite
Successfully installed HTSeq-0.6.1p1 PyYAML-3.11 pyfaidx-0.2.7 pyparsing-2.4.7 six-1.15.0 svgwrite-1.1.6 swalign-0.3.1
htseq rna-seq software error next-gen

Where (which directory) are you running your script from?

I am running it from the directory seen above in the ImportError, except at ~/Bioinformatics/softwares/guideseq/

It is the same directory with the setup.py and requirements.txt

The solution was that I had remove htseq from both my conda environment and system (in site-packages), and then install a version of htseq that was compatible with python2. I found that at https://anaconda.org/bcbio/htseq

0 answers

No answers yet.

Log in to answer this question.