<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; "><div>Hi Mateusz,</div><div><br></div>You would have to ask the BioPython developers how it finds numpy. We don't use BioPython so we don't know how it does it. Or you could look at the BioPython install output to see where it finds numpy, or if the install doesn't output much info you could look at the BioPython build scripts and try to figure it out.<div><br></div><div>It is very strange and it is hard for me to believe that BioPython would install with the Chimera Python and not use the numpy in that Python.</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>Tom</div><div><br><div><div>On Dec 5, 2013, at 9:03 AM, Mateusz Dobrychłop <<a href="mailto:dobry@g.pl">dobry@g.pl</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><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>
</blockquote></div><br></div></body></html>