ImportError: cannot import name getoutput (Biopython)
0
0
Entering edit mode
7.3 years ago
afbrito • 0

Dear all,

Could you please give me any help on how to deal with the error below. It concerns the package Bio._py3k, and occurs specifically at the last line of this package, failing to import getoutput.

I've tried to uninstall Biopython and reinstall different versions of it in order to fix the problem, however it was not successful. My last attempt was with Version 1.67. Seemingly, the other biopython packages are working fine, and only Phylo shows such problem.

I'm running Biopython on a Mac OSX Yosemite (10.10), python 2.7, biopython 1.68

What's the best solution for that?

Best,

[EDIT] I've just installed Python 3.6 and biopython 1.68, and the package could be imported without errors. However, with python 2.7 the problem persists.

/Library/Python/2.7/site-packages/selenium-2.48.0-py2.7.egg
    from Bio import Phylo
/Library/Python/2.7/site-packages/ete2-2.3.10-py2.7.egg
  File "/Library/Python/2.7/site-packages/Bio/Phylo/__init__.py", line 11, in <module>
/Library/Python/2.7/site-packages
    from Bio.Phylo._io import parse, read, write, convert
/Users/anderson/boxsync/PhD/courses/computing/misc
  File "/Library/Python/2.7/site-packages/Bio/Phylo/_io.py", line 13, in <module>
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip
    from Bio import File
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7
  File "/Library/Python/2.7/site-packages/Bio/File.py", line 28, in <module>
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin
    from Bio._py3k import basestring
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac
  File "/Library/Python/2.7/site-packages/Bio/_py3k/__init__.py", line 267, in <module>
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages
    from commands import getoutput
/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python
ImportError: cannot import name getoutput
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload
/Users/anderson/Library/Python/2.7/lib/python/site-packages
/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC
/Library/Python/2.7/site-packages
/Library/modeller-9.15/lib/mac10v4
/Library/modeller-9.15/modlib
python biopython ImportError • 4.4k views
ADD COMMENT
0
Entering edit mode

You appear to have a problem with your python installation that is only being evidenced because biopython is trying to use a standard package that you don't have.

ADD REPLY
1
Entering edit mode

I agree, from commands import getoutput is failing on something that Python 2.7 should come with https://docs.python.org/2/library/commands.html#commands.getoutput

ADD REPLY

Login before adding your answer.

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