Skip to content

Python wrapper error #27

@altnossum

Description

@altnossum

openmm built like:

$ conda install -c conda-forge cmake make cython swig fftw doxygen numpy
$ git clone https://github.com/openmm/openmm.git
$ cd openmm
$ mkdir build
$ cd build
$ ccmake ..
configure, CPU only build (unset CUDA and OpenCL options), generate

$ make
$ sudo make install
$ make test 
#all good
$ make PythonInstall   #conda doesn't require sudo
$ python  -m openmm.testInstallation   
#all good

openmmexampleplugin built like:

$ git close https://github.com/openmm/openmmexampleplugin.git
$ cd openmmexampleplugin
$ mkdir build
$ cd build
$ ccmake .. 
configure, CPU only build (unset CUDA and OpenCL options), other options already correct, generate
$ make
$ sudo make install
$ make test 
#all good
$ make PythonInstall

in ipython session:

In [1]:  from openmm import system
In [2]:  from exampleplugin import ExampleForce

giving following error:

ImportError                               Traceback (most recent call last) 
ImportError                               Traceback (most recent call last)                                                                                                                                                                  Input In [2], in <cell line: 1>()
----> 1 from openmmtorch import TorchForce

File ~/miniconda3/envs/torch_openmm/lib/python3.9/site-packages/openmmtorch.py:15, in <module>
       13     from . import _openmmtorch
       14 else:
---> 15     import _openmmtorch
       17 try:
       18     import builtins as __builtin__

ImportError: libOpenMMTorch.so: cannot open shared object file: No such file or directory           

I'm working on ubuntu 18.04.6 LTS
clean miniconda python3.9 environment.
Looks like swig is failing, don't know if this is an easy fix or I'm doing something wrong.

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