HTSeq Import Error Re: Working vs Build Directory
0
0
Entering edit mode
3.2 years ago

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 • 1.1k views
ADD COMMENT
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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

ADD REPLY

Login before adding your answer.

Traffic: 2360 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6