Question

I have Python2.7 installed and was having some issues with installing scipy. Through some Googling, I figured from a thread here (installing scipy on mac 10.6.8) that it is better to install scipy using MacPorts and IPython.

IPython looked cool and I wanted to try it. So far, too good - I feel great and elated that I could do all this by myself.

Now, I had Biopython installed with my Python2.7 (this version of Python2.7 was installed in a folder /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7).

In my overzealousness to try Ipython, I (think) I re-installed Python2.7, along with IPython, scipy, etc in a new directory /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7.

However, now I don't have Biopython in the new installation of Python2.7. So do I have to re-install Biopython in the new installation of Python2.7?

And if yes, how do I direct the installation to this folder?

Would it be like the following (say I have biopython-1.61.tar.gz in the folder Downloads):

cd Downloads
tar -xzvpf biopython-1.61.tar.gz
cd biopython-1.61
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/python setup.py install

I would like to hear if I am of-base here. Do not want to try and screw-up what I have so far!

I have Mac OS X V10.6.8.

Was it helpful?

Solution

The following worked for me (from MacPorts Python installation on Mac):

  1. Make the Python2.7/iPython2.7 installation I performed using MacPorts the default

    $ sudo port select --set python python27
    $ sudo port select --set ipython ipython27
    
  2. Check if Biopython is available through MacPorts

    $ port search biopython
    
  3. Install Biopython

    $ sudo port install py27-biopython  # install Biopython
    

OTHER TIPS

One of the toughest things for someone new to Python is figuring out the installation of all of the packages. It's a work in progress that is actively being discussed by the Python community.

I would recommend going with a commercial distribution that gives you everything you want that just works. This way you can start learning to work with Python instead of having to figure out how to get everything working.

I would recommend:

https://www.enthought.com/products/epd/free/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top