RSIA-LIESMARS-WHU/LSHBOX

Python import error in Linux

chubbymaggie opened this issue ยท 3 comments

Hi,
I have compiled the code but I couldn't find the libpylshbox.so binary in my build directory.
Can you explain the Linux compilation process in detail.

Thank you very much the great tool ๐Ÿ‘

Regards,
Maggie

In the README file of this tool, I had written: If you want or need to compile it by yourself with Python and MATLAB, please delete the comment of the last two lines in file CMakeLists.txt, and you will find the compiling progress of python must rely on Boost library or some part of this library. For more detailed information, you can view the document ./python/README.
I think you haven't remove the comment, so you cann't find the binary in your build directory. Please try again and don't hesitate to cantact us if your have any other problems.

Thank you for the prompt reply.
When I try to compile boost using option 'B'. I am getting following error.

/LSHBOX/python/boostpy_ms.cpp:25:39: fatal error: libs/python/src/numeric.cpp: No such file or directory
compilation terminated.
make[2]: *** [python/CMakeFiles/pylshbox.dir/boostpy_ms.cpp.o] Error 1
make[1]: *** [python/CMakeFiles/pylshbox.dir/all] Error 2
make: *** [all] Error 2

However, the file libs/python/src/numeric.cpp is there under LSHBOX/3rdparty/boost/ directory.

In my test, it can work well in Linux using option 'B'. I think you haven't replace the content of ./python/CMakeLists.txt with ./python/CMakeLists2.txt. In ./python/README, I had written this detail.

Option 'B' is different with option 'A', so the dependent CMakeLists.txt is different. The ./python/CMakeLists.txt is for operation 'A', and ./python/CMakeLists2.txt is for operation 'B', if you using option 'B', you should replace the content of ./python/CMakeLists.txt with ./python/CMakeLists2.txt. You can also delete ./python/CMakeLists.txt, and then rename ./python/CMakeLists2.txt as ./python/CMakeLists.txt.

If you compile right, you will get ./build/py_module/linux/libpylshbox.so, Try again!