Help with Biopython and Anaconda
1
0
Entering edit mode
6.7 years ago
Ed • 0

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 • 5.1k views
ADD COMMENT
2
Entering edit mode

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 REPLY
1
Entering edit mode
6.7 years ago
Joe 21k

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 COMMENT
0
Entering edit mode

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 REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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 REPLY

Login before adding your answer.

Traffic: 1463 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6