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

Cython compiling error while installing #7

Open
minoriinoue opened this issue Nov 23, 2017 · 4 comments
Open

Cython compiling error while installing #7

minoriinoue opened this issue Nov 23, 2017 · 4 comments
Labels

Comments

@minoriinoue
Copy link

Hi again :)

I would like to try out your One Class Random Forest Classifier (I read your paper as well).
However, in installing the code, I get some errors related to Cython files.

For example,
screen shot 2017-11-23 at 14 14 54

Do you know the problem or is there something I'm doing wrong?

Best,
Minori

@RomainBrault
Copy link
Collaborator

RomainBrault commented Nov 27, 2017

@ngoix have you modified this file (fast_dict.pxd)? If not it means that the error comes from scikit itself.
@minoriinoue could you tell us your numpy and cython version?

@minoriinoue
Copy link
Author

Thanks for the reply, @RomainBrault :)
Versions should be:
Numpy version: 1.13.3
cython version: 0.27.3

RomainBrault added a commit that referenced this issue Nov 27, 2017
@RomainBrault
Copy link
Collaborator

Ok it seems that the error comes from gcc-7 and higher (at the time it has been tested again gcc-6/gcc-5). Note that sklean 0.19 also fixed in the same file a bug related to clang.

@minoriinoue In the file sklearn/utils/fast_dict.pxd you should add right below the line

cimport numpy as np

a new line

import numpy as np

I proposed a pull request fixing this available in the branch cythonize-patch-1. Waiting for feedback on this fix before merge.

@RomainBrault
Copy link
Collaborator

NB: sklearn 0.20 proposed to simply remove the DTYPE and ITYPE lines instead of the 'import numpy as np'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants