Skip to content
This repository has been archived by the owner on Dec 6, 2023. It is now read-only.

problem with the latest version of conda #199

Open
elejeune11 opened this issue Jul 19, 2019 · 7 comments
Open

problem with the latest version of conda #199

elejeune11 opened this issue Jul 19, 2019 · 7 comments
Labels

Comments

@elejeune11
Copy link

PyEarth doesn't work with Anaconda 2019.03 for macOS (Python 3.7) (the installation fails).

Is this issue being worked out?

Thanks!

@jcrudy
Copy link
Collaborator

jcrudy commented Jul 28, 2019

@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?

@jcrudy jcrudy added the bug label Jul 28, 2019
@jk31
Copy link

jk31 commented Aug 7, 2019

@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

@jk31
Copy link

jk31 commented Aug 7, 2019

A colleague had the same problem, we both solved it simply by using the correct files:

https://pypi.org/project/sklearn-contrib-py-earth/#files

@collord
Copy link

collord commented Dec 16, 2019

OSX Catalina with Anaconda 2019.10. Compile errors like below, worked around with the advice from another failing build: SheffieldML/GPy#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

@nickums
Copy link

nickums commented Nov 14, 2020

I get exactly the same problem on windows10 python3.8:
running python setup.py install or pip install sklearn-contrib-py-earth

@cbbruss
Copy link

cbbruss commented Dec 2, 2020

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

@lisrael1
Copy link

lisrael1 commented Jun 1, 2023

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

7 participants