Issue
I'm following the 'ways to contribute' page in scikit-learn.
As per recommended, I've forked and cloned scikit-learn. After that I ran the commands: first I ran 'python setup.py build_ext --inplace', which gave me an error:
cc1: some warnings being treated as errors error: Command "x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/lib/python2.7/dist-packages/numpy/core/include -I/usr/lib/python2.7/dist-packages/numpy/core/include -I/usr/include/python2.7 -I/usr/include/python2.7 -c sklearn/neighbors/quad_tree.c -o build/temp.linux-x86_64-2.7/sklearn/neighbors/quad_tree.o" failed with exit status 1
So, first I thought that maybe this was some python issue. So I googled for 'python failed with exit status 1' and I found that the solution was python-dev not installed. But I already had that. So this solution was out of the picture.
Then again I ran 'pip install --editable .', which gave me this error:
Command "/usr/bin/python -c "import setuptools, tokenize;file='/home/sumedh/Downloads/Programming/OpenSourceContributions/scikit-learn/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" develop --no-deps" failed with error code 1 in /home/sumedh/Downloads/Programming/OpenSourceContributions/scikit-learn/
From the error, it looks like some issue in setup.py, but i'm not sure. I tried this as well, but no solution. Can you guys please help. thanks. :)
Solution
For those who had this issue, the issue is resolved by installing the latest Cython.
I mean, for me, it was not updated to the latest version. I'm using Ubuntu 16.04 LTS Xenial, which shows 0.23.4-0ubuntu5 as the latest.
One needs to install Cython from the official website. I mean install the very latest, not the one Ubuntu provides.(I first thought ubuntu updates our packages to the latest ones out there.) Installing it to the latest 0.27.3 solved the issue.
Answered By - AniketGM
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.