[chimera-dev] Numpy multiarray import problem

Tom Goddard goddard at sonic.net
Thu Dec 5 10:20:42 PST 2013


Hi Mateusz,

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.

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.

	Tom

On Dec 5, 2013, at 9:03 AM, Mateusz Dobrychłop <dobry at g.pl> wrote:

> Hi Tom,
> 
> Thank you for your quick reply.
> 
> 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?
> 
> Thank you for your time,
> Mateusz
> 
> 
> 2013/12/4 Tom Goddard <goddard at sonic.net>
> Hi Mateusz,
> 
>   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.
> 
> 	Tom
> 
> 
> 
> On Dec 4, 2013, at 7:18 AM, Mateusz Dobrychłop  wrote:
> 
>> Dear Chimera Team,
>> 
>> 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.
>> 
>> I'm trying to import something from the BioPython library, and BioPython is trying to import from numpy. I recieve a following error:
>> 
>> RuntimeError: module compiled against API version 8 but this version of numpy is 7
>> 
>> ...
>> 
>>   File "/home/mateusz/pyry4.4/Modules/Trans/ComponentRepresentation.py", line 6, in <module>
>>     from Bio.PDB                            import PDBParser, PDBIO, NeighborSearch
>>   File "/home/mateusz/.local/UCSF-Chimera64-1.8.1/lib/python2.7/site-packages/Bio/PDB/NeighborSearch.py", line 10, in <module>
>>     from Bio.KDTree import KDTree
>>   File "/home/mateusz/.local/UCSF-Chimera64-1.8.1/lib/python2.7/site-packages/Bio/KDTree/__init__.py", line 10, in <module>
>>     from KDTree import KDTree
>>   File "/home/mateusz/.local/UCSF-Chimera64-1.8.1/lib/python2.7/site-packages/Bio/KDTree/KDTree.py", line 20, in <module>
>>     from Bio.KDTree import _CKDTree
>> <type 'exceptions.ImportError'>: numpy.core.multiarray failed to import
>> 
>> 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.
>> 
>> I'm using Chimera 1.8.1 on Ubuntu 12.10 (64 - bit).
>> 
>> Is there anything I can do to make it work?
>> 
>> Best wishes,
>> Mateusz
>> _______________________________________________
>> Chimera-dev mailing list
>> Chimera-dev at cgl.ucsf.edu
>> http://www.rbvi.ucsf.edu/mailman/listinfo/chimera-dev
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-dev/attachments/20131205/80e9a7d2/attachment.html>


More information about the Chimera-dev mailing list