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

Problem with build_cython.py #9

Closed
lupotto opened this issue Apr 20, 2018 · 6 comments
Closed

Problem with build_cython.py #9

lupotto opened this issue Apr 20, 2018 · 6 comments

Comments

@lupotto
Copy link

lupotto commented Apr 20, 2018

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,

@ignacio-rocco
Copy link
Owner

Did you try conda install cython?

@lupotto
Copy link
Author

lupotto commented Apr 20, 2018

yes I do

@lupotto
Copy link
Author

lupotto commented Apr 20, 2018

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

@lupotto
Copy link
Author

lupotto commented Apr 23, 2018

I solved the problem in this way:

  1. Changing the PYTHONPATH in my ./bashrc file.
  2. 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

@ignacio-rocco
Copy link
Owner

Hi, it seems that this might be related with your GPU being too old.

Please see here and here.

@lupotto
Copy link
Author

lupotto commented Apr 24, 2018

I solved the issue changing the architecture of the make.sh

@lupotto lupotto closed this as completed Apr 24, 2018
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

2 participants