omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    Problem importing biopython module

    Pythonista
    biopython importerror
    2
    3
    2880
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • tgerme
      tgerme last edited by

      Hello there, I am new to Pythonista and it’s been great so far but i am having problems importing the biopython package.
      I have installed it using pip but when I run the following import I get this:

      from Bio import SeqIO
      Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/mobile/Containers/Shared/AppGroup/60AB303A-8972-4389-BAB8-077C39F8243A/Pythonista3/Documents/site-packages-2/Bio/SeqIO/init.py", line 375, in <module>
      from Bio.Align import MultipleSeqAlignment
      File "/private/var/mobile/Containers/Shared/AppGroup/60AB303A-8972-4389-BAB8-077C39F8243A/Pythonista3/Documents/site-packages-2/Bio/Align/init.py", line 22, in <module>
      from Bio.Align import _aligners
      ImportError: cannot import name _aligners

      What am I doing wrong? I used this package with Anaconda and spyder before with no problems

      Many thanks!
      Thomas

      JonB 1 Reply Last reply Reply Quote 0
      • JonB
        JonB @tgerme last edited by

        @tgerme biopython has lots of c extensions that of course won't work on iOS:
        EXTENSIONS = [
        Extension('Bio.Align._aligners',
        ['Bio/Align/_aligners.c']),
        Extension('Bio.cpairwise2',
        ['Bio/cpairwise2module.c']),
        Extension('Bio.Nexus.cnexus',
        ['Bio/Nexus/cnexus.c']),
        Extension('Bio.PDB.QCPSuperimposer.qcprotmodule',
        ["Bio/PDB/QCPSuperimposer/qcprotmodule.c"]),
        Extension('Bio.motifs._pwm',
        ["Bio/motifs/_pwm.c"]),
        Extension('Bio.Cluster._cluster',
        ['Bio/Cluster/cluster.c', 'Bio/Cluster/clustermodule.c']),
        Extension('Bio.PDB.kdtrees',
        ["Bio/PDB/kdtrees.c"]),
        Extension('Bio.KDTree._CKDTree',
        ["Bio/KDTree/KDTree.c", "Bio/KDTree/KDTreemodule.c"]),
        ]

        If you need those, you cannot use biopython in pythonista.

        1 Reply Last reply Reply Quote 0
        • tgerme
          tgerme last edited by

          That makes sense, thank you

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Powered by NodeBB Forums | Contributors