wujcan / SGL-TensorFlow

173 stars 42 forks source link

Is there a way to run it without using Cython? #5

Closed bh0903lee closed 2 years ago

bh0903lee commented 3 years ago

Hi, thank you for sharing the codes. I have a question. Is there a way to run it without using Cython?

First, when I run main.py in Ubuntu 16.x, then an error occurs like, "ImportError: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `CXXABI_1.3.11' not found (required by /home/user/SGL/util/cython/arg_topk.cpython-37m-x86_64-linux-gnu.so)".

Then, I tried to run in Windows 10. After "!python setup.py build_ext --inplace" command, then an error occurs like "error: Unable to find vcvarsall.bat".

If "python main.py" execution proceeds in this state, then the following error occurs, "ModuleNotFoundError: No module named 'util.cython.random_choice'".

I'd like to get it to run without Cython even though the execution is slow. Thus, is there a way to run it without using Cython?

Thanks.

wujcan commented 3 years ago

Hi, thank you for sharing the codes. I have a question. Is there a way to run it without using Cython?

First, when I run main.py in Ubuntu 16.x, then an error occurs like, "ImportError: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `CXXABI_1.3.11' not found (required by /home/user/SGL/util/cython/arg_topk.cpython-37m-x86_64-linux-gnu.so)".

Then, I tried to run in Windows 10. After "!python setup.py build_ext --inplace" command, then an error occurs like "error: Unable to find vcvarsall.bat".

If "python main.py" execution proceeds in this state, then the following error occurs, "ModuleNotFoundError: No module named 'util.cython.random_choice'".

I'd like to get it to run without Cython even though the execution is slow. Thus, is there a way to run it without using Cython?

Thanks.

I am afraid you need to debug the code line by line and comment out those lines that call cython to disable cpp acceleration or replace it with the python version.

Regarding the error occurred in Ubuntu, it seems that the GCC and g++ version are old on your device. I highly suggest you to update them and try again. There are many solutions on the web.

Regarding the error occurred in Windows 10, missing vcvarsall.bat is also a common error and you can also find its solution on the web.

Hope these help.