Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BOLT for python 3? #6

Closed
Sun694 opened this issue Aug 30, 2020 · 7 comments
Closed

BOLT for python 3? #6

Sun694 opened this issue Aug 30, 2020 · 7 comments

Comments

@Sun694
Copy link

Sun694 commented Aug 30, 2020

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?

@Sun694
Copy link
Author

Sun694 commented Aug 30, 2020

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?

@calvinmccarter
Copy link
Contributor

calvinmccarter commented Aug 2, 2021

@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.

@dpalbrecht
Copy link

dpalbrecht commented Sep 1, 2021

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

@dblalock
Copy link
Owner

dblalock commented Sep 1, 2021

Thanks for the bug report! Running out of time tonight, but will look into this tomorrow.

@dpalbrecht
Copy link

@dblalock thanks very much! Looking forward to running it

@dblalock
Copy link
Owner

dblalock commented Sep 8, 2021

It looks like this is the same issue as #4? Going to keep further discussion over there to get it all in one place.

@dblalock
Copy link
Owner

dblalock commented Sep 8, 2021

Feel free to reopen if it looks like this is a separate problem.

@dblalock dblalock closed this as completed Sep 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants