Issue 1:
_dbscan_inner.cpp

c:\users\prasanth chettri\appdata\local\programs\python\python37\lib\site-packages\numpy\core\include\numpy\npy_1_7_deprecated_api.h(12) : Warning Msg: Using deprecated NumPy API, disable it by #defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION

sklearn\cluster_dbscan_inner.cpp(5960): error C2039: 'exc_type': is not a member of '_ts'

c:\users\prasanth chettri\appdata\local\programs\python\python37\include\pystate.h(209): note: see declaration of '_ts'

sklearn\cluster_dbscan_inner.cpp(5961): error C2039: 'exc_value': is not a member of '_ts'

c:\users\prasanth chettri\appdata\local\programs\python\python37\include\pystate.h(209): note: see declaration of '_ts'

sklearn\cluster_dbscan_inner.cpp(5962): error C2039: 'exc_traceback': is not a member of '_ts'

c:\users\prasanth chettri\appdata\local\programs\python\python37\include\pystate.h(209): note: see declaration of '_ts'

sklearn\cluster_dbscan_inner.cpp(5969): error C2039: 'exc_type': is not a member of '_ts'

c:\users\prasanth chettri\appdata\local\programs\python\python37\include\pystate.h(209): note: see declaration of '_ts'

sklearn\cluster_dbscan_inner.cpp(5970): error C2039: 'exc_value': is not a member of '_ts'

c:\users\prasanth chettri\appdata\local\programs\python\python37\include\pystate.h(209): note: see declaration of '_ts'

sklearn\cluster_dbscan_inner.cpp(5971): error C2039: 'exc_traceback': is not a member of '_ts'

c:\users\prasanth chettri\appdata\local\programs\python\python37\include\pystate.h(209): note: see declaration of '_ts'

sklearn\cluster_dbscan_inner.cpp(5972): error C2039: 'exc_type': is not a member of '_ts'

c:\users\prasanth chettri\appdata\local\programs\python\python37\include\pystate.h(209): note: see declaration of '_ts'

sklearn\cluster_dbscan_inner.cpp(5973): error C2039: 'exc_value': is not a member of '_ts'

c:\users\prasanth chettri\appdata\local\programs\python\python37\include\pystate.h(209): note: see declaration of '_ts'

sklearn\cluster_dbscan_inner.cpp(5974): error C2039: 'exc_traceback': is not a member of '_ts'

c:\users\prasanth chettri\appdata\local\programs\python\python37\include\pystate.h(209): note: see declaration of '_ts'

sklearn\cluster_dbscan_inner.cpp(6029): error C2039: 'exc_type': is not a member of '_ts'

c:\users\prasanth chettri\appdata\local\programs\python\python37\include\pystate.h(209): note: see declaration of '_ts'

sklearn\cluster_dbscan_inner.cpp(6030): error C2039: 'exc_value': is not a member of '_ts'

c:\users\prasanth chettri\appdata\local\programs\python\python37\include\pystate.h(209): note: see declaration of '_ts'

sklearn\cluster_dbscan_inner.cpp(6031): error C2039: 'exc_traceback': is not a member of '_ts'

c:\users\prasanth chettri\appdata\local\programs\python\python37\include\pystate.h(209): note: see declaration of '_ts'

sklearn\cluster_dbscan_inner.cpp(6032): error C2039: 'exc_type': is not a member of '_ts'

c:\users\prasanth chettri\appdata\local\programs\python\python37\include\pystate.h(209): note: see declaration of '_ts'

sklearn\cluster_dbscan_inner.cpp(6033): error C2039: 'exc_value': is not a member of '_ts'

c:\users\prasanth chettri\appdata\local\programs\python\python37\include\pystate.h(209): note: see declaration of '_ts'

sklearn\cluster_dbscan_inner.cpp(6034): error C2039: 'exc_traceback': is not a member of '_ts'

c:\users\prasanth chettri\appdata\local\programs\python\python37\include\pystate.h(209): note: see declaration of '_ts'

----------------------------------------

Command ""c:\users\prasanth chettri\appdata\local\programs\python\python37\python.exe" -u -c "import setuptools, tokenize;file='C:\Users\PRASAN1\AppData\Local\Temp\pip-install-sxdgy2gx\scikit-learn\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record C:\Users\PRASAN1\AppData\Local\Temp\pip-record-dheiq8_j\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\PRASAN~1\AppData\Local\Temp\pip-install-sxdgy2gx\scikit-learn\

Issue 2:
Description

Unable to pip install(compile error: PyThreadState has no member ...) with Python 3.7rc1.

My apologies if this has been reported, but I couldn't find it in the issues (closed/open) nor any pull request for it.

There have been similar issues with pyyaml (yaml/pyyaml#126), numpy (numpy/numpy#10500), cython (cython/cython#1978), and pygame (pygame/pygame#382).

Steps/Code to Reproduce

Install Python 3.7rc1.

pip install scikit-learn

Expected Results

pip succeeds.

Actual Results

Compilation errors:

...
sklearn/cluster/_dbscan_inner.cpp: In function ‘int
__Pyx__GetException(PyThreadState*, PyObject**, PyObject**, PyObject**)’:

sklearn/cluster/_dbscan_inner.cpp:6029:24: error: ‘PyThreadState’ has no member named ‘exc_type’
tmp_type = tstate->exc_type;
^
sklearn/cluster/_dbscan_inner.cpp:6030:25: error: ‘PyThreadState’ has no member named ‘exc_value’
tmp_value = tstate->exc_value;
^
sklearn/cluster/_dbscan_inner.cpp:6031:22: error: ‘PyThreadState’ has no member named ‘exc_traceback’
tmp_tb = tstate->exc_traceback;
^
sklearn/cluster/_dbscan_inner.cpp:6032:13: error: ‘PyThreadState’ has no member named ‘exc_type’
tstate->exc_type = local_type;
^
sklearn/cluster/_dbscan_inner.cpp:6033:13: error: ‘PyThreadState’ has no member named ‘exc_value’
tstate->exc_value = local_value;
^
sklearn/cluster/_dbscan_inner.cpp:6034:13: error: ‘PyThreadState’ has no member named ‘exc_traceback’
tstate->exc_traceback = local_tb;
^
error: Command "g++ -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g
-fwrapv -O3 -Wall -fPIC
-I/data/install/lib/python3.7/site-packages/numpy/core/include
-I/data/install/lib/python3.7/site-packages/numpy/core/include
-I/data/install/include/python3.7m -c sklearn/cluster/_dbscan_inner.cpp -o
build/temp.linux-x86_64-3.7/sklearn/cluster/_dbscan_inner.o -MMD -MF
build/temp.linux-x86_64-3.7/sklearn/cluster/_dbscan_inner.o.d" failed with exit
status 1

Versions

Linux-3.10.0-862.el7.x86_64-x86_64-with-redhat-7.5-Maipo
Python 3.7.0rc1 (default, Jun 19 2018, 10:54:58)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-28)]
NumPy 1.14.5
SciPy 1.1.0