Home Download Buy Blog Forum Support

ImportError: No module named 'Bio'

ImportError: No module named 'Bio'

Postby briano on Thu Jul 03, 2014 10:58 pm

All,

I'm puzzled. At the command line the system's /usr/bin/python uses the "Bio" module, no error:

5020 > python
Python 2.7.5 (default, Mar 9 2014, 22:15:05)
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from Bio.Seq import Seq
>>> ^D

But my plugin code starts like this:

import sublime, sublime_plugin
from Bio.Seq import Seq
from Bio.Alphabet import IUPAC

And exits like this in the Console:

ImportError: No module named 'Bio'
>>> from Bio.Seq import Seq
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named 'Bio'

Why is that?

Thank you,

Brian O.
briano
 
Posts: 9
Joined: Tue Jul 01, 2014 11:52 pm

Re: ImportError: No module named 'Bio'

Postby briano on Thu Jul 03, 2014 11:08 pm

Ah. The embedded interpreter. So what is the best workaround, given that anyone who would want to use this plugin I'm making will have to install the "Bio" (BioPython) code?
briano
 
Posts: 9
Joined: Tue Jul 01, 2014 11:52 pm

Re: ImportError: No module named 'Bio'

Postby briano on Fri Jul 04, 2014 2:36 am

Let's try something like this in Plugin.py:

import sys
sys.path.append('/usr/local/lib/python3.4/site-packages')
from Bio.Seq import Seq
briano
 
Posts: 9
Joined: Tue Jul 01, 2014 11:52 pm


Return to Plugin Development

Who is online

Users browsing this forum: No registered users and 2 guests