Open elejeune11 opened 5 years ago
@elejeune11 I was not aware. I haven't had much time to work on py-earth lately, and probably won't for a few months at least. Unfortunately, that means as other projects make changes issues like this will start to arise. If you or someone else reading this has time to figure this out and create a pull request, I would be very happy to support you with advice and code reviews.
In the meantime, @elejeune11, would you mind posting here the error message you get when you try to conda install py-earth?
@elejeune11 Did you find a solution? I have Win10 and a clean python 3.7 environment . I also installed also the C++ Build Tools but running python setup.py install
or pip install sklearn-contrib-py-earth
gives me
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2
A colleague had the same problem, we both solved it simply by using the correct files:
OSX Catalina with Anaconda 2019.10. Compile errors like below, worked around with the advice from another failing build: https://github.com/SheffieldML/GPy/issues/649. find -name '*.pyx' -exec cython {} \;
pyearth/_util.c:8071:21: error: no member named 'exc_type' in 'struct _ts' *type = tstate->exc_type;
pyearth/_util.c:8072:22: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
*value = tstate->exc_value;
^~~~~~~~~
curexc_value
I get exactly the same problem on windows10 python3.8: running python setup.py install or pip install sklearn-contrib-py-earth
I'm still digging into this myself. If you run the setup with '--cythonize' and import from the new build files it appears to work fine with 3.7
few years later... i have another solution, but more complicated one... let me elaborate on the error - at windows, when i install
git clone git://github.com/scikit-learn-contrib/py-earth.git
cd py-earth
python setup.py install
i get errors:
C:\ProgramData\Anaconda3\envs\apps\lib\site-packages\numpy\core\include\numpy\npy_1_7_deprecated_api.h(14) : Warning Msg: Using deprecated NumPy API, di
sable it with #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
pyearth/_util.c(8071): error C2039: 'exc_type': is not a member of '_ts'
C:\ProgramData\Anaconda3\envs\apps\include\cpython/pystate.h(51): note: see declaration of '_ts'
pyearth/_util.c(8072): error C2039: 'exc_value': is not a member of '_ts'
C:\ProgramData\Anaconda3\envs\apps\include\cpython/pystate.h(51): note: see declaration of '_ts'
pyearth/_util.c(8073): error C2039: 'exc_traceback': is not a member of '_ts'
C:\ProgramData\Anaconda3\envs\apps\include\cpython/pystate.h(51): note: see declaration of '_ts'
pyearth/_util.c(8080): error C2039: 'exc_type': is not a member of '_ts'
C:\ProgramData\Anaconda3\envs\apps\include\cpython/pystate.h(51): note: see declaration of '_ts'
pyearth/_util.c(8081): error C2039: 'exc_value': is not a member of '_ts'
C:\ProgramData\Anaconda3\envs\apps\include\cpython/pystate.h(51): note: see declaration of '_ts'
pyearth/_util.c(8082): error C2039: 'exc_traceback': is not a member of '_ts'
C:\ProgramData\Anaconda3\envs\apps\include\cpython/pystate.h(51): note: see declaration of '_ts'
pyearth/_util.c(8083): error C2039: 'exc_type': is not a member of '_ts'
C:\ProgramData\Anaconda3\envs\apps\include\cpython/pystate.h(51): note: see declaration of '_ts'
pyearth/_util.c(8084): error C2039: 'exc_value': is not a member of '_ts'
C:\ProgramData\Anaconda3\envs\apps\include\cpython/pystate.h(51): note: see declaration of '_ts'
pyearth/_util.c(8085): error C2039: 'exc_traceback': is not a member of '_ts'
C:\ProgramData\Anaconda3\envs\apps\include\cpython/pystate.h(51): note: see declaration of '_ts'
pyearth/_util.c(8140): error C2039: 'exc_type': is not a member of '_ts'
C:\ProgramData\Anaconda3\envs\apps\include\cpython/pystate.h(51): note: see declaration of '_ts'
pyearth/_util.c(8141): error C2039: 'exc_value': is not a member of '_ts'
C:\ProgramData\Anaconda3\envs\apps\include\cpython/pystate.h(51): note: see declaration of '_ts'
pyearth/_util.c(8142): error C2039: 'exc_traceback': is not a member of '_ts'
C:\ProgramData\Anaconda3\envs\apps\include\cpython/pystate.h(51): note: see declaration of '_ts'
pyearth/_util.c(8143): error C2039: 'exc_type': is not a member of '_ts'
C:\ProgramData\Anaconda3\envs\apps\include\cpython/pystate.h(51): note: see declaration of '_ts'
pyearth/_util.c(8144): error C2039: 'exc_value': is not a member of '_ts'
C:\ProgramData\Anaconda3\envs\apps\include\cpython/pystate.h(51): note: see declaration of '_ts'
pyearth/_util.c(8145): error C2039: 'exc_traceback': is not a member of '_ts'
C:\ProgramData\Anaconda3\envs\apps\include\cpython/pystate.h(51): note: see declaration of '_ts'
pyearth/_util.c(8562): warning C4244: 'initializing': conversion from 'double' to 'float', possible loss of data
pyearth/_util.c(8568): warning C4244: 'initializing': conversion from 'double' to 'float', possible loss of data
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.32.31326\\bin\\HostX86\\x64\\cl.exe' failed with
exit code 2
the solution is to enter to pyearch folder from wsl and run
sed -i 's/tstate->exc/tstate->curexc/' *.c
or manually change all tstate->exc to tstate->curexc at all .c files
then run
python setup.py install
again.
PyEarth doesn't work with Anaconda 2019.03 for macOS (Python 3.7) (the installation fails).
Is this issue being worked out?
Thanks!