<div dir="ltr"><div><div><div>Hi Tom,<br><br></div>Thank you for your quick reply.<br><br></div>I tried reinstalling Chimera and installing BioPython using Chimera's Python again, but this doesn't solve the problem. Because of that, I suppose BioPython compiles using numpy 1.8 installed in my system, not the one 1.7 version that comes with Chimera. Could you please tell me how I can make sure that BioPython is compiled using Chimera's numpy?<br>
<br></div><div>Thank you for your time,<br></div><div>Mateusz<br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/12/4 Tom Goddard <span dir="ltr"><<a href="mailto:goddard@sonic.net" target="_blank">goddard@sonic.net</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">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 style="white-space:pre-wrap"> </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><blockquote type="cite"><div><div class="h5">
<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></div></div>
_______________________________________________<br>Chimera-dev mailing list<br><a href="mailto:Chimera-dev@cgl.ucsf.edu" target="_blank">Chimera-dev@cgl.ucsf.edu</a><br><a href="http://www.rbvi.ucsf.edu/mailman/listinfo/chimera-dev" target="_blank">http://www.rbvi.ucsf.edu/mailman/listinfo/chimera-dev</a><br>
</blockquote></div><br></div></div></blockquote></div><br></div>