Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • crh
    Member
    • Dec 2009
    • 46

    bowtie2-build python error

    Hi

    We installed bowtie2-2.3.2 on an ubuntu system.
    Running bowtie2-build we received the following error that I think indicates problems with the python installation??

    ./bowtie2-build /home/charlesh/binf/sto1/seq/genome/chlre/chlre5.5/Creinhardtii_281_v5.0.fa cre_281_v5.0
    File "/usr/lib/python3.4/site.py", line 182
    file=sys.stderr)
    ^
    SyntaxError: invalid syntax

    Suggestions?

    Charles
  • wdecoster
    Member
    • Oct 2015
    • 97

    #2
    Which python version are you using?

    Comment

    • crh
      Member
      • Dec 2009
      • 46

      #3
      Python 3.4.3 and 2.7 are installed on the system.

      Python 3.4.3 appears to be the default.

      charlesh@~/binf/src/bowtie2-2.3.2 => python
      Python 3.4.3 (default, Nov 17 2016, 01:08:31)
      [GCC 4.8.4] on linux

      I downloaded what I believe was the binary for bowtie2:
      bowtie2-2.3.2-linux-x86_64.zip

      however, for both bowtie2 and bowtie2-build they are not binaries I can see the python code.

      Charles

      Comment

      • alec
        Member
        • Apr 2011
        • 18

        #4
        The line in question is: print("\nRemainder of file ignored", file=sys.stderr)

        This is valid syntax in python 3 but not 2. It looks like bowtie is using python 2.7 but it is trying to load modules for 3.4.3.

        What does `/usr/bin/env python --version` print? What are your PATH and PYTHONPATH environment variables?

        Comment

        • crh
          Member
          • Dec 2009
          • 46

          #5
          Here is what /env is set to:

          charlesh@~/binf/src/bowtie2-2.3.2 => /usr/bin/env python --version
          Python 2.7.6

          PYTHONPATH
          PYTHONPATH=/usr/lib/python3.4/:/usr/local/lib/python3.4/dist-packages:/home/charlesh/binf/lib:/home/charlesh/binf/bin/drive5_py/:/home/charlesh/binf/lib/drive5_py:/home/charlesh/binf/bin/galaxy_tools/:/home/charlesh/lib/:/home/charlesh/binf/src/biopython-1.61:/home/charlesh/binf/src/PyCogent-1.5.3:/home/charlesh/binf/src/RNASeqReadSimulator-master/src:/home/charlesh/binf/lib/uparse:/home/charlesh/binf/src/scikit-bio:/home/charlesh/binf/src/picrust:/home/charlesh/binf/src/hdf5-1.8.1

          PATH:
          PATH=/home/charlesh/binf/R/bin:/usr/bin:/bin::/home/charlesh/binf/lib:/usr/games:/usr/bin:/usr/sbin:/sbin:/usr/local/sbin:/usr/local/bin:/home/charlesh/binf/bin:/home/charlesh/binf/bin/galaxy_tools/:/home/charlesh/binf/bin/drive5_py/:/home/charlesh/bin:/home/charlesh/bin/x86_64:/home/charlesh/bin/x86_64:/home/charlesh/binf/lib:/home/charlesh/binf/bin:/home/charlesh/binf/src/blat_33:/home/charlesh/binf/src/clustalx1.82.linux:/usr/lib/phylip/bin:/home/charlesh/binf/lib/drive5:/home/charlesh/bin/misassembly_tools:/home/charlesh/binf/lib/drive5_py:/home/charlesh/binf/src/microbiomeutil-r20110519/ChimeraSlayer:/home/charlesh/binf/src/bedtools2-2.19.1/bin:/usr/lib/phylip/bin:/home/charlesh/bin/misassembly_tools:/home/charlesh/binf/src/PASA_r20130907/misc_utilities/:/home/charlesh/binf/src/PASA_r20130907/scripts:/home/charlesh/binf/src/ucsc/bin/:/home/charlesh/binf/src/bowtie2-2.3.2/:/home/charlesh/binf/src/tophat-2.0.13.Linux_x86_64/:/home/charlesh/binf/bin/drive5_py/:/usr/lib/qiime/bin/:/home/charlesh/binf/src/ncbi-blast-2.2.30+/bin:/home/charlesh/binf/src/TransDecoder/:/home/charlesh/binf/src/inparanoid_4.1:/home/charlesh/binf/src/Trimmomatic-0.36/:/seu/cs/home/user/c/charlesh/bin/misassembly_tools

          Comment

          • alec
            Member
            • Apr 2011
            • 18

            #6
            Removing "/usr/lib/python3.4/:/usr/local/lib/python3.4/dist-packages" from the start of your PYTHONPATH should fix your immediate problem.

            The problem is that bowtie2-build is using python 2.7 (because the first line is #!/usr/bin/env python). However, your PYTHONPATH is causing it to try to load python 3 libraries.

            Alternatively, you could make sure that the location of python 3 is on your PATH variable. I'm not sure why `/usr/bin/env python` is launching 2.7 while in your earlier post you indicated that just typing `python` launches 3.4

            Comment

            • crh
              Member
              • Dec 2009
              • 46

              #7
              Alec

              Moving the python3.4 info into PATH and out of PYTHONPATH solved the problem.

              Thanks!

              Comment

              Latest Articles

              Collapse

              • SEQadmin2
                Proteomic Platforms: How to Choose the Right Analytical Strategy to Improve Detection and Clinical Applications
                by SEQadmin2


                Proteomics platforms are evolving rapidly, with advances in mass spectrometry and affinity-based approaches expanding what researchers can detect and at what scale. As the field moves toward deeper proteome coverage and clinical applications, scientists face an increasingly complex landscape of tools. This article will explore how researchers are navigating these choices to find the right platform for their work.

                The systematic characterization of the human proteome has
                ...
                07-20-2026, 11:48 AM
              • 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

              ad_right_rmr

              Collapse

              News

              Collapse

              Topics Statistics Last Post
              Started by SEQadmin2, 07-24-2026, 12:17 PM
              0 responses
              16 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 07-23-2026, 11:41 AM
              0 responses
              18 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 07-20-2026, 11:10 AM
              0 responses
              23 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 07-13-2026, 10:26 AM
              0 responses
              37 views
              0 reactions
              Last Post SEQadmin2  
              Working...