I reinstalled Biopython and I no longer get the import error! Thanks for all your suggestions.
I did get quite a few warnings when reinstalling Biopython (using easyinstaller), do you have any thoughts on why I get these? Could they be related to the import issue?
Searching for biopython Reading http://biopython.org/DIST/ /Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/setuptools-12.0.5-py3.4.egg/pkg_resources/__init__.py:2510: PEP440Warning: 'biopython (corba-0.2.1)' is being parsed as a legacy, non PEP 440, version. You may find odd behavior and sort order. In particular it will be sorted as less than 0.0. It is recommend to migrate to PEP 440 compatible versions. /Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/setuptools-12.0.5-py3.4.egg/pkg_resources/__init__.py:2510: PEP440Warning: 'biopython (corba-0.3.0)' is being parsed as a legacy, non PEP 440, version. You may find odd behavior and sort order. In particular it will be sorted as less than 0.0. It is recommend to migrate to PEP 440 compatible versions. Best match: biopython 1.65 Downloading http://biopython.org/DIST/biopython-1.65.zip Processing biopython-1.65.zip Writing /tmp/easy_install-jqt75dle/biopython-1.65/setup.cfg Running biopython-1.65/setup.py -q bdist_egg --dist-dir /tmp/easy_install-jqt75dle/biopython-1.65/egg-dist-tmp-jgo6r6jw warning: no previously-included files matching '.cvsignore' found under directory '*' warning: no previously-included files matching '*.pyc' found under directory '*' ld: warning: ignoring file build/temp.macosx-10.6-intel-3.4/Bio/cpairwise2module.o, file was built for unsupported file format ( 0xCF 0xFA 0xED 0xFE 0x07 0x00 0x00 0x01 0x03 0x00 0x00 0x00 0x01 0x00 0x00 0x00 ) which is not the architecture being linked (i386): build/temp.macosx-10.6-intel-3.4/Bio/cpairwise2module.o ld: warning: ld: warning: ignoring file build/temp.macosx-10.6-intel-3.4/Bio/triemodule.o, file was built for unsupported file format ( 0xCF 0xFA 0xED 0xFE 0x07 0x00 0x00 0x01 0x03 0x00 0x00 0x00 0x01 0x00 0x00 0x00 ) which is not the architecture being linked (i386): build/temp.macosx-10.6-intel-3.4/Bio/triemodule.oignoring file build/temp.macosx-10.6-intel-3.4/Bio/trie.o, file was built for unsupported file format ( 0xCF 0xFA 0xED 0xFE 0x07 0x00 0x00 0x01 0x03 0x00 0x00 0x00 0x01 0x00 0x00 0x00 ) which is not the architecture being linked (i386): build/temp.macosx-10.6-intel-3.4/Bio/trie.o ld: warning: ignoring file build/temp.macosx-10.6-intel-3.4/Bio/Nexus/cnexus.o, file was built for unsupported file format ( 0xCF 0xFA 0xED 0xFE 0x07 0x00 0x00 0x01 0x03 0x00 0x00 0x00 0x01 0x00 0x00 0x00 ) which is not the architecture being linked (i386): build/temp.macosx-10.6-intel-3.4/Bio/Nexus/cnexus.o ld: warning: ld: warning: ignoring file build/temp.macosx-10.6-intel-3.4/Bio/Cluster/clustermodule.o, file was built for unsupported file format ( 0xCF 0xFA 0xED 0xFE 0x07 0x00 0x00 0x01 0x03 0x00 0x00 0x00 0x01 0x00 0x00 0x00 ) which is not the architecture being linked (i386): build/temp.macosx-10.6-intel-3.4/Bio/Cluster/clustermodule.oignoring file build/temp.macosx-10.6-intel-3.4/Bio/Cluster/cluster.o, file was built for unsupported file format ( 0xCF 0xFA 0xED 0xFE 0x07 0x00 0x00 0x01 0x03 0x00 0x00 0x00 0x01 0x00 0x00 0x00 ) which is not the architecture being linked (i386): build/temp.macosx-10.6-intel-3.4/Bio/Cluster/cluster.o ld: warning: ld: warning: ignoring file build/temp.macosx-10.6-intel-3.4/Bio/KDTree/KDTree.o, file was built for unsupported file format ( 0xCF 0xFA 0xED 0xFE 0x07 0x00 0x00 0x01 0x03 0x00 0x00 0x00 0x01 0x00 0x00 0x00 ) which is not the architecture being linked (i386): build/temp.macosx-10.6-intel-3.4/Bio/KDTree/KDTree.oignoring file build/temp.macosx-10.6-intel-3.4/Bio/KDTree/KDTreemodule.o, file was built for unsupported file format ( 0xCF 0xFA 0xED 0xFE 0x07 0x00 0x00 0x01 0x03 0x00 0x00 0x00 0x01 0x00 0x00 0x00 ) which is not the architecture being linked (i386): build/temp.macosx-10.6-intel-3.4/Bio/KDTree/KDTreemodule.o ld: warning: ignoring file build/temp.macosx-10.6-intel-3.4/Bio/Motif/_pwm.o, file was built for unsupported file format ( 0xCF 0xFA 0xED 0xFE 0x07 0x00 0x00 0x01 0x03 0x00 0x00 0x00 0x01 0x00 0x00 0x00 ) which is not the architecture being linked (i386): build/temp.macosx-10.6-intel-3.4/Bio/Motif/_pwm.o ld: warning: ignoring file build/temp.macosx-10.6-intel-3.4/Bio/motifs/_pwm.o, file was built for unsupported file format ( 0xCF 0xFA 0xED 0xFE 0x07 0x00 0x00 0x01 0x03 0x00 0x00 0x00 0x01 0x00 0x00 0x00 ) which is not the architecture being linked (i386): build/temp.macosx-10.6-intel-3.4/Bio/motifs/_pwm.o zip_safe flag not set; analyzing archive contents... Bio.__pycache__.cpairwise2.cpython-34: module references __file__ Bio.__pycache__.trie.cpython-34: module references __file__ Bio.Cluster.__pycache__.cluster.cpython-34: module references __file__ Bio.Entrez.__pycache__.Parser.cpython-34: module references __path__ Bio.KDTree.__pycache__._CKDTree.cpython-34: module references __file__ Bio.Motif.__pycache__._pwm.cpython-34: module references __file__ Bio.motifs.__pycache__._pwm.cpython-34: module references __file__ Bio.Nexus.__pycache__.cnexus.cpython-34: module references __file__ creating /Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/biopython-1.65-py3.4-macosx-10.6-intel.egg Extracting biopython-1.65-py3.4-macosx-10.6-intel.egg to /Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages Adding biopython 1.65 to easy-install.pth file Installed /Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/biopython-1.65-py3.4-macosx-10.6-intel.egg Processing dependencies for biopython Finished processing dependencies for biopython
What operating system do you use? Did you install Biopython correctly? Does this happen when you try to import other Biopython components (eg. import Bio) or is this specific to the Cluster module?
I use OSX. Yes I think Biopython is correctly installed, because I am able to import other modules so I suspect this is specific for Bio.Cluster. The following, for example, works fine:
This looks like a problem with the Bio.Cluster package. We should wait for someone from the Bio Cluster team to take a look at this post.