Question: Help with Biopython and Anaconda
0
gravatar for Ed
2.5 years ago by
Ed0
Ed0 wrote:

Hi,

I am new bioinformatics using Python and have encountered a problem importing Biopython to Anaconda. Please help.

As far as I can tell, I have installed the package using Conda and it is visible on my root environment. However, I still can't seem to import it when using Jupyter notebooks in Anaconda.

biopython anaconda • 2.8k views
ADD COMMENTlink modified 2.5 years ago by Joe15k • written 2.5 years ago by Ed0
2

Please elaborate on which commands you used for installing the packages, which commands you use for importing and which errors you get. We can't read minds, unfortunately.

ADD REPLYlink written 2.5 years ago by WouterDeCoster42k
1
gravatar for Joe
2.5 years ago by
Joe15k
United Kingdom
Joe15k wrote:

My preferred way to install python packages (conda or otherwise).

Install conda, and ensure that you start the right interpreter (the binary installed by conda). Result of which python should return a path including your conda path. For example, for me it's:

joehealey@Joes-MacBook-Pro~ $ which python
/Users/joehealey/Applications/miniconda2/bin/python # NOT /usr/local/bin or some other path

joehealey@Joes-MacBook-Pro~ $ python
Python 2.7.13 |Continuum Analytics, Inc.| (default, Dec 20 2016, 23:05:08)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://anaconda.org

Then:

$ python -m pip install biopython

Should work and will ensure that all the paths etc. are set up correctly. It's basically the same process outlined in my previous answer: A: Run a Python program in Ubuntu

This is assuming of course that the error I think you're having is the right one. As Wouter pointed out, we need more info.

ADD COMMENTlink modified 2.5 years ago • written 2.5 years ago by Joe15k

Thanks for your help, and sorry for the lack of detail (I'm very new to this).

I believe that's sorted it now..

ADD REPLYlink written 2.5 years ago by Ed0

If that's solved your issue, be sure to accept the answer so that the thread doesn't remain open ended.

ADD REPLYlink written 2.5 years ago by Joe15k

Welcome to biostars. Interesting guidelines for posting can be found in the following posts:

If an answer was helpful you should upvote it, if the answer resolved your question you should mark it as accepted. Upvote|Bookmark|Accept

ADD REPLYlink written 2.5 years ago by WouterDeCoster42k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 2090 users visited in the last hour