<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Mateusz,<div><br></div><div> I think your error message means that the BioPython _CKDTree module was compiled against numpy 1.8 (API version 8) instead of numpy 1.7 (API version 7) that is used in Chimera. Numpy 1.8 was released Oct 30, 2013. If you installed BioPython from source code using Chimera's Python then it should use the Chimera numpy 1.7. So either you didn't compile BioPython using the Chimera numpy (maybe you installed a precompiled version), or you compiled it and it found numpy 1.8 somewhere outside of Chimera on your computer. To make things work you will need to make sure BioPython is compiled using the Chimera numpy, specifically using its numpy header files (in site-packages/numpy/core/include). It will not work to install numpy 1.8 in Chimera because that will break all the Chimera modules that were compiled with numpy 1.7.</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>Tom</div><div><br></div><div><br></div><div><br><div><div>On Dec 4, 2013, at 7:18 AM, Mateusz Dobrychłop wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr"><div><div><div><div><div>Dear Chimera Team,<br><br></div>I am working on my own Chimera Extension. After succesful installation of BioPython using Chimera's Python copy, I've encountered another BioPython - related problem, that is also related to the numpy library.<br>
<br></div>I'm trying to import something from the BioPython library, and BioPython is trying to import from numpy. I recieve a following error:<br><br><span style="font-family:courier new,monospace">RuntimeError: module compiled against API version 8 but this version of numpy is 7<br>
<br>...<br><br> File "/home/mateusz/pyry4.4/Modules/Trans/ComponentRepresentation.py", line 6, in <module><br> from Bio.PDB import PDBParser, PDBIO, NeighborSearch<br> File "/home/mateusz/.local/UCSF-Chimera64-1.8.1/lib/python2.7/site-packages/Bio/PDB/NeighborSearch.py", line 10, in <module><br>
from Bio.KDTree import KDTree<br> File "/home/mateusz/.local/UCSF-Chimera64-1.8.1/lib/python2.7/site-packages/Bio/KDTree/__init__.py", line 10, in <module><br> from KDTree import KDTree<br> File "/home/mateusz/.local/UCSF-Chimera64-1.8.1/lib/python2.7/site-packages/Bio/KDTree/KDTree.py", line 20, in <module><br>
from Bio.KDTree import _CKDTree<br><type 'exceptions.ImportError'>: numpy.core.multiarray failed to import</span><br><br></div>I tried to install numpy the same way I installed BioPython (using Chimera's Python copy), but this does not solve the problem. I also tried to import numpy.core.multiarray directly in Chimera's IDLE and it did import.<br>
<br></div><div>I'm using Chimera 1.8.1 on Ubuntu 12.10 (64 - bit).<br></div><div><br></div>Is there anything I can do to make it work?<br><br></div>Best wishes,<br>Mateusz<br></div>
_______________________________________________<br>Chimera-dev mailing list<br><a href="mailto:Chimera-dev@cgl.ucsf.edu">Chimera-dev@cgl.ucsf.edu</a><br>http://www.rbvi.ucsf.edu/mailman/listinfo/chimera-dev<br></blockquote></div><br></div></body></html>