insilichem / tangram

:black_square_button::atom_symbol: A collection of molecular modelling tools for UCSF Chimera
http://tangram-suite.readthedocs.io
Other
17 stars 3 forks source link

problem with normal modes #12

Closed JeanDidier closed 5 years ago

JeanDidier commented 5 years ago

Hello,

I have the following problem with the calculation of the normal modes. When trying to open on linux the normal mode interface I have:

RuntimeError: module compiled against API version 0xa but this version of numpy is 0x7 /home/jeandi/miniconda3/envs/tangram/lib/python2.7/site-packages/scipy/init.py:115: UserWarning: Numpy 1.8.2 or above is recommended for this version of scipy (detected version 1.7.2) UserWarning) RuntimeError: module compiled against API version 9 but this version of numpy is 7 RuntimeError: module compiled against API version 9 but this version of numpy is 7 ImportError Exception in Tk callback Function: <function activate at 0x7f7298c276e0> (type: <type 'function'>) Module: <module 'chimera.extension.base' from '/home/jeandi/.local/UCSF-Chimera64-1.13.1rc/share/chimera/extension/base.pyc'> (line: 487) Args: () Traceback (innermost last): File "/home/jeandi/.local/UCSF-Chimera64-1.13.1rc/lib/python2.7/site-packages/Pmw/Pmw_1_3_3/lib/PmwBase.py", line 1747, in call return apply(self.func, args) File "/home/jeandi/.local/UCSF-Chimera64-1.13.1rc/share/chimera/extension/base.py", line 488, in activate e.menuActivate(cat) File "/home/jeandi/.local/UCSF-Chimera64-1.13.1rc/share/chimera/extension/base.py", line 91, in menuActivate self.activate() File "/home/jeandi/miniconda3/envs/tangram/lib/python2.7/site-packages/normalmodes/ChimeraExtension.py", line 23, in activate self.module('gui').showUI() File "/home/jeandi/.local/UCSF-Chimera64-1.13.1rc/share/chimera/extension/base.py", line 113, in module mod = import(fullName) File "/home/jeandi/miniconda3/envs/tangram/lib/python2.7/site-packages/normalmodes/gui.py", line 12, in from core import Controller File "/home/jeandi/miniconda3/envs/tangram/lib/python2.7/site-packages/normalmodes/core.py", line 11, in import prody File "/home/jeandi/miniconda3/envs/tangram/lib/python2.7/site-packages/prody/init.py", line 95, in from . import dynamics File "/home/jeandi/miniconda3/envs/tangram/lib/python2.7/site-packages/prody/dynamics/init.py", line 242, in from . import rtb File "/home/jeandi/miniconda3/envs/tangram/lib/python2.7/site-packages/prody/dynamics/rtb.py", line 12, in from scipy import sparse File "/home/jeandi/miniconda3/envs/tangram/lib/python2.7/site-packages/scipy/sparse/init.py", line 231, in from .csr import * File "/home/jeandi/miniconda3/envs/tangram/lib/python2.7/site-packages/scipy/sparse/csr.py", line 15, in from ._sparsetools import csr_tocsc, csr_tobsr, csr_count_blocks, \ ImportError: numpy.core.multiarray failed to import

ImportError: numpy.core.multiarray failed to import

File "/home/jeandi/miniconda3/envs/tangram/lib/python2.7/site-packages/scipy/sparse/csr.py", line 15, in from ._sparsetools import csr_tocsc, csr_tobsr, csr_count_blocks, \

See reply log for Python traceback.

jaimergp commented 5 years ago

You should have obtained a warning about the NumPy version during the installation (check here for the relevant code).

In short, you must update Chimera's Numpy with:

conda activate ~/tangram
pip install -U 'numpy==1.11.*' -t $(pychimera --path)/lib/python2.7/site-packages

Take into account that this operation cannot be undone, and some extensions in Chimera will stop working (those depending on MMTK, mainly, but also any other relying on the deprecated numpy.numeric). If you need those, you can always install a new Chimera instance in a different directory.

JeanDidier commented 5 years ago

Great! THis works fine!

jaimergp commented 5 years ago

Nice! I will update the documentation to reflect this!

jaimergp commented 5 years ago

Done!