-
-
Notifications
You must be signed in to change notification settings - Fork 25.3k
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
scikit-learn fails to install with python 3.7.0 on macOS 12.13.5 #11378
Comments
Presumably a Cython limitation: cython/cython#1955. Are you using the most recent version? It seems to have been fixed in 0.27.3 |
Yes, I have: $ pip3 list | grep -i cython
Cython 0.28.3
$ and this still fails to build? |
That's interesting... make sure that that is the actual Cython version being used to compile the files. |
It should be using the correct cython: $ which cython
/usr/local/bin/cython
$
$ cat $(which cython)
#!/Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7
# EASY-INSTALL-ENTRY-SCRIPT: 'Cython==0.28.3','console_scripts','cython'
__requires__ = 'Cython==0.28.3'
import re
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(
load_entry_point('Cython==0.28.3', 'console_scripts', 'cython')()
)
$ cython --version
Cython version 0.28.3
$ cython
Cython (http://cython.org) is a compiler for code written in the
Cython language. Cython is based on Pyrex by Greg Ewing.
Usage: cython [options] sourcefile.{pyx,py} ...
Options:
-V, --version Display version number of cython compiler
-l, --create-listing Write error messages to a listing file
-I, --include-dir <directory> Search for include files in named directory
(multiple include directories are allowed).
-o, --output-file <filename> Specify name of generated C file
-t, --timestamps Only compile newer source files
-f, --force Compile all source files (overrides implied -t)
-v, --verbose Be verbose, print file names on multiple compilation
-p, --embed-positions If specified, the positions in Cython files of each
function definition is embedded in its docstring.
--cleanup <level> Release interned objects on python exit, for memory debugging.
Level indicates aggressiveness, default 0 releases nothing.
-w, --working <directory> Sets the working directory for Cython (the directory modules
are searched from)
--gdb Output debug information for cygdb
--gdb-outdir <directory> Specify gdb debug information output directory. Implies --gdb.
-D, --no-docstrings Strip docstrings from the compiled module.
-a, --annotate Produce a colorized HTML version of the source.
--annotate-coverage <cov.xml> Annotate and include coverage information from cov.xml.
--line-directives Produce #line directives pointing to the .pyx source
--cplus Output a C++ rather than C file.
--embed[=<method_name>] Generate a main() function that embeds the Python interpreter.
-2 Compile based on Python-2 syntax and code semantics.
-3 Compile based on Python-3 syntax and code semantics.
--lenient Change some compile time errors to runtime errors to
improve Python compatibility
--capi-reexport-cincludes Add cincluded headers to any auto-generated header files.
--fast-fail Abort the compilation on the first error
--warning-errors, -Werror Make all warnings into errors
--warning-extra, -Wextra Enable extra warnings
-X, --directive <name>=<value>[,<name=value,...] Overrides a compiler directive
$ |
I have the same problem - macos 10.13.5, python 3.7, cython 0.28.3, pip install scikit-learn fails. I was able to install scikit-learn-0.20.dev0 from master with pip install ., but pip install fails if I first "git checkout 0.19.1" with this error. Not sure if it is related to the problems installing scikit-learn from pypi. Error compiling Cython file:
|
Can confirm that I was getting the same error that mario-grgic posted, in a similar environment (macOS 10.12.6, just upgraded to Python 3.7.0 via Homebrew, with Cython 0.28.3). And like selasley, installing scikit-learn@master (0.20.dev0) seems to be working so far (at least, pip completes successfully, and things import at the Python REPL just fine):
|
I'm getting the same errors (same error text, while building dbscan with Cython 0.28.3) on Debian testing. Installing from master as chbrown described works with no problems, just a deprecation notice regarding |
I'm going to close this one and leave #11320 open for Python 3.7 issues. See #11320 (comment) for my proposed roadmap. |
Attempted to install scikit-learn with python 3.7.0 ( I have Cython 0.28.3 installed):
The text was updated successfully, but these errors were encountered: