Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • ssb
    Junior Member
    • Mar 2016
    • 4

    HTSeq - NameError: name 're' is not defined

    I'm trying to use HTSeq but getting "NameError: name 're' is not defined" after import HTSeq command. As I'm a novice, I don't know how to resolve the issue. It would be nice if someone could help me in getting through.
    >>> import HTSeq

    Traceback (most recent call last):
    File "<pyshell#11>", line 1, in <module>
    import HTSeq
    File "C:\Python27\lib\site-packages\HTSeq\__init__.py", line 144, in <module>
    _re_attr_main = re.compile( "\s*([^\s\=]+)[\s=]+(.*)" )
    NameError: name 're' is not defined
  • fanli
    Senior Member
    • Jul 2014
    • 197

    #2
    Does this work for you?

    Code:
    import re
    Did you follow the installation instructions for Windows?

    Comment

    • ssb
      Junior Member
      • Mar 2016
      • 4

      #3
      Yes, I followed all instructions.
      No, "import re" doesn't work. See below,


      >>> import re
      >>> import HTSeq

      Traceback (most recent call last):
      File "<pyshell#1>", line 1, in <module>
      import HTSeq
      File "C:\Python27\lib\site-packages\HTSeq\__init__.py", line 9, in <module>
      from _HTSeq import *
      File "numpy.pxd", line 155, in init HTSeq._HTSeq (src/_HTSeq.c:34392)
      ValueError: numpy.dtype has the wrong size, try recompiling
      >>> import HTSeq

      Traceback (most recent call last):
      File "<pyshell#2>", line 1, in <module>
      import HTSeq
      File "C:\Python27\lib\site-packages\HTSeq\__init__.py", line 144, in <module>
      _re_attr_main = re.compile( "\s*([^\s\=]+)[\s=]+(.*)" )
      NameError: name 're' is not defined

      Comment

      • fanli
        Senior Member
        • Jul 2014
        • 197

        #4
        Probably should try recompiling numpy:

        I just installed pandas and statsmodels package on my python 2.7. When I tried import pandas as pd, this error message comes out. Can anyone help? numpy.dtype has the wrong size, try recompiling

        Comment

        • maubp
          Peter (Biopython etc)
          • Jul 2009
          • 1544

          #5
          How did you install HTSeq and NumPy?

          My guess is you have a mis-match between the version of NumPy installed, and the version that HTSeq expects (i.e. what it was compiled against).

          Comment

          • ssb
            Junior Member
            • Mar 2016
            • 4

            #6
            Thanks fanli!
            I'll recompile and check whether the same error comes again or not.
            Is R / Bioconductor useful in high throughput sequence analysis?

            Comment

            • fanli
              Senior Member
              • Jul 2014
              • 197

              #7
              Yes, R is pretty handy for all sorts of statistical things. For example, differential expression testing using edgeR, DESeq2, etc.

              Comment

              • ssb
                Junior Member
                • Mar 2016
                • 4

                #8
                Thanks fanli!

                Comment

                Latest Articles

                Collapse

                • SEQadmin2
                  Advanced Sequencing Platforms Tackle Neuroscience’s Toughest Genomics Problems
                  by SEQadmin2



                  Genomics studies in neuroscience face a special challenge due to the brain’s complexity and scarcity of samples. Mapping changes in cell type and state using conventional next-generation sequencing methods remains challenging. Advances in technologies like single-cell sequencing, spatial transcriptomics, and long-read sequencing have opened the door to deeper studies of the brain and diseases like Alzheimer’s, amyotrophic lateral sclerosis (ALS), and schizophrenia.
                  ...
                  07-09-2026, 11:10 AM
                • SEQadmin2
                  Cancer Drug Resistance: The Lingering Barrier to Rising Survival
                  by SEQadmin2



                  Cancer survival rates have significantly increased in the last few decades in the United States, reaching a combined 70% 5-year survival rate by 2021. Behind this number, there are years of research to find new therapies, drug targets, and early detection methods. But there is one core challenge that keeps slowing down these advances, and it’s about drug resistance.

                  There is no single reason why many patients don’t respond to treatment as expected. Cancer is...
                  07-08-2026, 05:17 AM
                • GATTACAT
                  Reply to Nine Things a Sample Prep Scientist Thinks About Before Sequencing
                  by GATTACAT
                  Love this - good data definitely starts from good input, and poor input can only give relatively poor data. I particularly like the mention of Nanodrop/absorbance based methods for quantification. It's such a toss up if you'll get an accurate reading or what amounts to a randomly generated number, and a lot of library/sequencing related issues can be traced back to poor quant.
                  07-01-2026, 11:43 AM

                ad_right_rmr

                Collapse

                News

                Collapse

                Topics Statistics Last Post
                Started by SEQadmin2, 07-13-2026, 10:26 AM
                0 responses
                22 views
                0 reactions
                Last Post SEQadmin2  
                Started by SEQadmin2, 07-09-2026, 10:04 AM
                0 responses
                32 views
                0 reactions
                Last Post SEQadmin2  
                Started by SEQadmin2, 07-08-2026, 10:08 AM
                0 responses
                20 views
                0 reactions
                Last Post SEQadmin2  
                Started by SEQadmin2, 07-07-2026, 11:05 AM
                0 responses
                34 views
                0 reactions
                Last Post SEQadmin2  
                Working...