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
Link error on Windows #3566
Comments
It is probably caused by the fact that we generated the windows wheel against a more recent version of numpy than the one you have installed. Could you please tell us which version of numpy (and scipy) are installed on your system? Can you please try to upgrade to the latest stable version of numpy and scipy and see if that fixes the problem? |
I think this is the same problem as #3548 but for Windows. |
Actually this is not the same problem as #3548 as the issue reported by @Roottan is a compile time problem and not a runtime problem. I think this is a problem in numpy. I found this issue numpy/numpy#2099 that seems related but was fixed a long time ago in numpy. I can reproduce @Roottan's error when building against the current official numpy 1.8.1 for windows. However I don't have the problem when I build against @cgohlke's numpy from http://www.lfd.uci.edu/~gohlke/pythonlibs/ so it seems that @cgohlke's version of numpy has been patched in some way to workaround this issue. |
@ogrisel nope. Which binary installer did you use exactly for numpy ? |
I think the issue is that |
@cgohlke's analysis is correct. One cannot currently build numpy with one compiler and other extensions with another. It may be fairly hard to fix in numpy. |
Alright thanks for you analysis @cgohlke and @cournape. I will just redefine the |
I would put it in a little header file next to SGD for now. We can then move that elsewhere if the need arises. #ifdef _MSC_VER
# include <float.h>
# define isfinite _finite
#else
# include <numpy/npy_math.h>
# define isfinite npy_isfinite
#endif |
npy_isfinite from npy_math.h depends on the compiler used to build numpy. If we build scikit-learn with a different compiler (e.g. MSVC vs MinGW) this can cause link errors. Therefore we redefine the isfinite macro in a scikit-learn specific header file.
npy_isfinite from npy_math.h depends on the compiler used to build numpy. If we build scikit-learn with a different compiler (e.g. MSVC vs MinGW) this can cause link errors. Therefore we redefine the isfinite macro in a scikit-learn specific header file.
npy_isfinite from npy_math.h depends on the compiler used to build numpy. If we build scikit-learn with a different compiler (e.g. MSVC vs MinGW) this can cause link errors. Therefore we redefine the isfinite macro in a scikit-learn specific header file.
[MRG+1] FIX #3566: redefine isfinite alias in sklearn
npy_isfinite from npy_math.h depends on the compiler used to build numpy. If we build scikit-learn with a different compiler (e.g. MSVC vs MinGW) this can cause link errors. Therefore we redefine the isfinite macro in a scikit-learn specific header file.
npy_isfinite from npy_math.h depends on the compiler used to build numpy. If we build scikit-learn with a different compiler (e.g. MSVC vs MinGW) this can cause link errors. Therefore we redefine the isfinite macro in a scikit-learn specific header file.
npy_isfinite from npy_math.h depends on the compiler used to build numpy. If we build scikit-learn with a different compiler (e.g. MSVC vs MinGW) this can cause link errors. Therefore we redefine the isfinite macro in a scikit-learn specific header file.
[MRG+1] FIX scikit-learn#3566: redefine isfinite alias in sklearn
npy_isfinite from npy_math.h depends on the compiler used to build numpy. If we build scikit-learn with a different compiler (e.g. MSVC vs MinGW) this can cause link errors. Therefore we redefine the isfinite macro in a scikit-learn specific header file.
npy_isfinite from npy_math.h depends on the compiler used to build numpy. If we build scikit-learn with a different compiler (e.g. MSVC vs MinGW) this can cause link errors. Therefore we redefine the isfinite macro in a scikit-learn specific header file.
npy_isfinite from npy_math.h depends on the compiler used to build numpy. If we build scikit-learn with a different compiler (e.g. MSVC vs MinGW) this can cause link errors. Therefore we redefine the isfinite macro in a scikit-learn specific header file.
When I recomiling and linking the code ,find some error ,like this:
OS: windows7 64bit
python: 2.7 32bit
VC: 2008 express version
The text was updated successfully, but these errors were encountered: