Skip to content

RuntimeError when using numpy <1.13 #57

@marta-sd

Description

@marta-sd

Hi,

I have troubles working with the newest version of RDKit together with not-the-newest version of numpy.

It seems like rdkit package requires numpy=1.13, although it is not stated in the dependencies. The simplest example that doesn't work (tested on Ubuntu 16.04):

conda create -c rdkit -n rdkit_test python=3.6 numpy=1.12 rdkit=2017.09.1
source activate rdkit_test

and then in Python I get this error:

>>> import rdkit
>>> from rdkit import Chem
RuntimeError: module compiled against API version 0xb but this version of numpy is 0xa
RuntimeError: module compiled against API version 0xb but this version of numpy is 0xa
RuntimeError: module compiled against API version 0xb but this version of numpy is 0xa
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/martas/miniconda3/envs/rdkit_test/lib/python3.6/site-packages/rdkit/Chem/__init__.py", line 25, in <module>
    from rdkit.Chem.rdmolops import *
SystemError: initialization of rdmolops raised unreported exception

Note that importing rdkit doesn't raise the exception. Also, when I use Python 2.7 I get slightly different error:

>>> from rdkit import Chem
RuntimeError: module compiled against API version 0xb but this version of numpy is 0xa
RuntimeError: module compiled against API version 0xb but this version of numpy is 0xa
RuntimeError: module compiled against API version 0xb but this version of numpy is 0xa
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/martas/miniconda3/envs/rdkit_py27/lib/python2.7/site-packages/rdkit/Chem/__init__.py", line 25, in <module>
    from rdkit.Chem.rdmolops import *
ImportError: numpy.core.multiarray failed to import

When I create the environment with numpy v. 1.13 everything works fine (checked in Py3.6 and Py2.7).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions