Problem with build_cython.py
lupotto opened this issue · 6 comments
Hello,
First of all thank you for share this amazing code and repo.
I am having troubles with build_cython.py, when I compile I got the following error:
Traceback (most recent call last):
File "build_cython.py", line 20, in
from Cython.Build import cythonize
ImportError: No module named Cython.Build
Traceback (most recent call last):
File "/home/alupotto/PycharmProjects/c_mon/utils/boxes.py", line 54, in
import utils_cython.cython_bbox as cython_bbox
ImportError: No module named 'utils_cython.cython_bbox'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/alupotto/PycharmProjects/c_mon/cmon.py", line 10, in
from utils.preprocess_sample import preprocess_sample
File "/home/alupotto/PycharmProjects/c_mon/utils/preprocess_sample.py", line 5, in
from utils.multilevel_rois import add_multilevel_rois_for_test
File "/home/alupotto/PycharmProjects/c_mon/utils/multilevel_rois.py", line 16, in
import utils.boxes as box_utils
File "/home/alupotto/PycharmProjects/c_mon/utils/boxes.py", line 66, in
raise('--> utils_cython modules compilation failed')
TypeError: exceptions must derive from BaseException
I tried to dis comment other libraries of build_cython.py and it can't detect the others as well. It would be awesome if anybody can help me out.
Thank you,
Did you try conda install cython
?
yes I do
I tried to enter in my environment and import cython and Cython.Build and it worked.
Python 3.5.5 |Anaconda, Inc.| (default, Mar 12 2018, 23:12:44)
[GCC 7.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
import cython
import Cython.Build
But in the project I get this error
I solved the problem in this way:
- Changing the PYTHONPATH in my ./bashrc file.
- After that, I had to compile Cython by myself running this command:
python build_cython.py build_ext --inplace
in /detectorch/lib/utils_cython
Right now I can do all the imports and the different steps but I have another problem that seems to be related to my GPU: error in BilinearSampler.updateOutput: no kernel image is available for execution on the device
Any suggestions on this matter?
Again, thank you for sharing this
I solved the issue changing the architecture of the make.sh