BOLT for python 3?
Sun694 opened this issue · 7 comments
I was unable to get BOLT working on python three after a bit of debugging.
I finally tried pip installing it, and see an error message stating only python 2.6+ is supported.
Is there any way to get python 3 supported?
I should be more verbose: All I'm trying to do is calculate a fast dot product between a given query and a set of keys.
When trying to do python setup.py install
, I get a string of errors ending with:
python\bolt\config.i(46) : Warning 315: Nothing known about 'Eigen::Dynamic'.
python\bolt\config.i(46) : Warning 315: Nothing known about 'Eigen::Dynamic'.
python\bolt\config.i(47) : Warning 315: Nothing known about 'Eigen::RowMajor'.
python\bolt\config.i(45) : Warning 315: Nothing known about 'Eigen::Matrix'.
python\bolt\config.i(46) : Warning 315: Nothing known about 'Eigen::Dynamic'.
python\bolt\config.i(46) : Warning 315: Nothing known about 'Eigen::Dynamic'.
python\bolt\config.i(47) : Warning 315: Nothing known about 'Eigen::RowMajor'.
python\bolt\config.i(46) : Warning 315: Nothing known about 'Eigen::Dynamic'.
python\bolt\config.i(46) : Warning 315: Nothing known about 'Eigen::Dynamic'.
python\bolt\config.i(47) : Warning 315: Nothing known about 'Eigen::RowMajor'.
python\bolt\config.i(45) : Warning 315: Nothing known about 'Eigen::Matrix'.
python\bolt\config.i(46) : Warning 315: Nothing known about 'Eigen::Dynamic'.
python\bolt\config.i(46) : Warning 315: Nothing known about 'Eigen::Dynamic'.
python\bolt\config.i(47) : Warning 315: Nothing known about 'Eigen::RowMajor'.
swigging cpp\src\external\eigen\.hg\store\data\_c_test_config.cmake.i to cpp\src\external\eigen\.hg\store\data\_c_test_config.cmake_wrap.cpp
G:\conda_reinstall\condainstall\envs\torch\Library\bin\swig.exe -python -c++ -o cpp\src\external\eigen\.hg\store\data\_c_test_config.cmake_wrap.cpp cpp\src\external\eigen\.hg\store\data\_c_test_config.cmake.i
cpp\src\external\eigen\.hg\store\data\_c_test_config.cmake.i(1) : Error: Illegal token '▀'.
cpp\src\external\eigen\.hg\store\data\_c_test_config.cmake.i(1) : Error: Syntax error in input(1).
error: command 'G:\\conda_reinstall\\condainstall\\envs\\torch\\Library\\bin\\swig.exe' failed with exit status 1
This might be completely unrelated to python2/3, and if you have a solution to this issue instead, then all is perfect 👍
Thanks
Update: This error happens even on Google Colab with Python=2.7, so I don't think this is actually a python version issue.
That being the case, have any ideas?
@dblalock -- I'm getting the same error as @Sun694.
For what it's worth, I was able to install your swig-numpy-example
repo and successfully run python test.py
. So I think my swig install is working fine.
In addition, I tried forcing clang++, which again led to the error above. But unlike the person in Issue #4, compiling your simple main.cpp
with clang++ main.cpp -o main.out -std=c++14 -stdlib=libc++
works for me.
I'm getting a similar error in Colab, is there a fix?
python/bolt/config.i:45: Warning 315: Nothing known about 'Eigen::Matrix'.
python/bolt/config.i:46: Warning 315: Nothing known about 'Eigen::Dynamic'.
python/bolt/config.i:46: Warning 315: Nothing known about 'Eigen::Dynamic'.
python/bolt/config.i:47: Warning 315: Nothing known about 'Eigen::RowMajor'.
python/bolt/config.i:45: Warning 315: Nothing known about 'Eigen::Matrix'.
python/bolt/config.i:46: Warning 315: Nothing known about 'Eigen::Dynamic'.
python/bolt/config.i:46: Warning 315: Nothing known about 'Eigen::Dynamic'.
python/bolt/config.i:47: Warning 315: Nothing known about 'Eigen::RowMajor'.
swigging cpp/src/external/eigen/.hg/store/data/_c_test_config.cmake.i to cpp/src/external/eigen/.hg/store/data/_c_test_config.cmake_wrap.cpp
swig -python -c++ -o cpp/src/external/eigen/.hg/store/data/_c_test_config.cmake_wrap.cpp cpp/src/external/eigen/.hg/store/data/_c_test_config.cmake.i
cpp/src/external/eigen/.hg/store/data/_c_test_config.cmake.i:3: Error: Unterminated string constant
error: command 'swig' failed with exit status 1
Thanks for the bug report! Running out of time tonight, but will look into this tomorrow.
@dblalock thanks very much! Looking forward to running it
It looks like this is the same issue as #4? Going to keep further discussion over there to get it all in one place.
Feel free to reopen if it looks like this is a separate problem.