ImportError: dynamic module does not define init function
I followed the instructions in the readme and compiled with -DUSE_PYTHON=2 , when I do bash eval_all.sh I get error:
Traceback (most recent call last): File "train_lpo.py", line 31, in from lpo import * File "/home/revathy/lpo-release/src/lpo.py", line 45, in from python.lpo import * ImportError: dynamic module does not define init function (PyInit_lpo)
hope you could help me. Thanks.
Is the lpo module built? Is there an lpo.so? Are you building lpo with the same version of python as you're calling it?
ya I did mkdir build cd build cmake .. -DCMAKE_BUILD_TYPE=Release -DDATA_DIR=/path/to/datasets -DUSE_PYTHON=ON make -j9
also I have lpo.so in build/lib/python.
$ python version Python 2.7.10 :: Anaconda 2.3.0 (64-bit)
I have only gotten this error, when I build lpo with boost-python3 and run it with python2 or vice versa.
i have gotten this error too, if you build lpo with python2, you need modify python3 to python2 in file eval_all.sh:
P=${PYTHON:=python2}