Adding Submodules To Biopython?
1
1
Entering edit mode
11.0 years ago

Hello, I'm an infrequent user of Python (v 3.23) and Biopython (v 1.59), but when I need it I can usually hack my way through some code to get what I want done. My problem is this -- I need to use a sub-module 'Bio.SearchIO' that is not included with my version of Biopython, and am very weary of updating for fear of 'breaking' my current scripts that work fine. I really don't want to have to go through and re-write deprecated portions, or figure out new formatting styles. Is there a way to just add a single sub-module to my current package? (I really just need Bio.SearchIO for right now, and it would be great to add modules as I need them, rather than go through the hassle of updating). I use a Windows machine (I know, I know) running 64-bit Windows 7, and I don't remember installation of anything being easy.

Thanks,

Charles

python biopython windows • 2.1k views
ADD COMMENT
1
Entering edit mode
11.0 years ago

Your best approach is to use virtual environments, which allows you to maintain multiple simultaneous versions of libraries. This blog post contains information on setting up and activating a virtual environment, including pip for installation. Once you have them set up, you can activate the virtual environment you need to support different versions of your scripts.

Generally, I wouldn't recommend trying to manually include modules inside older versions. Biopython also does a good job of maintaining back compatibility and tries to make the upgrade process for older script easy when it does break something, so it's possible your old scripts will work cleanly with recent versions as well. If you install the newest release inside a virtual environment you can test them before deciding to upgrade your system.

ADD COMMENT

Login before adding your answer.

Traffic: 1599 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