scikit-learn-contrib / py-earth

A Python implementation of Jerome Friedman's Multivariate Adaptive Regression Splines
http://contrib.scikit-learn.org/py-earth/
BSD 3-Clause "New" or "Revised" License
457 stars 122 forks source link

adding py-earth to a conda repository #123

Closed mehdidc closed 5 years ago

mehdidc commented 8 years ago

@fabianp @mblondel I think it could be nice to add py-earth to the conda repository you built for lightning in https://anaconda.org/scikit-learn-contrib. What do you think ? is there a way to access that account to upload new packages ? otherwise I can take care of compiling the code and send you the tarball if it is ok for you.

fabianp commented 8 years ago

Hi,

I could add you to that organization on conda so you ads packages, but I was myself thinking of migrating to conda-forge as they take care of the build infrastructure On Jun 27, 2016 11:43 PM, "Mehdi Cherti" notifications@github.com wrote:

@fabianp https://github.com/fabianp @mblondel https://github.com/mblondel I think it could be nice to add py-earth to the conda repository you built for lightning in https://anaconda.org/scikit-learn-contrib. What do you think ? is there a way to access that account to upload new packages ? otherwise I can take care of compiling the code and send you the tarball if it is ok for you.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/scikit-learn-contrib/py-earth/issues/123, or mute the thread https://github.com/notifications/unsubscribe/AAQ8hyQD4-61K1_zHlUElcvNFYj0zXGwks5qQEPwgaJpZM4I_iYi .

mehdidc commented 8 years ago

Thanks @fabianp, I was not aware of conda-forge, if they take care of the build infastructure (moreover, I have seen that they support windows as well as osx and linux) then let's use it.

jimmywan commented 7 years ago

Any news on this front? Would like to have this available via conda. :)

jcrudy commented 7 years ago

I've been pretty busy with other things lately, so not much progress has been made in terms of releasing version 0.1 (which would then go on pypi and conda). It's been a long time since anyone has found a serious bug in py-earth, so probably I should just call what we now have 0.1 and release it. I'll try to do that soon. Feel free to bug me about it.

jimmywan commented 7 years ago

Feel free to bug me about it.

:)

jcrudy commented 7 years ago

Feel free to bug me about it.

:)

@jimmywan Keep up the good work! I'm going to try to get to this soon, but it never hurts to prod me further.

jimmywan commented 7 years ago

bump

jcrudy commented 7 years ago

I should have time next week! @jimmywan, if I don't update next week, feel free to bump this thread again.

jimmywan commented 7 years ago

Any progress? I'm still interested because I ran into problems trying to install this by hand.

I found a few links from others mentioning the same difficulties related to one of the dependencies and getting the right version of gcc (forgot which one).

jcrudy commented 7 years ago

@jimmywan I made some progress, but hit a snag with a bug that shows up on Windows 32 bit systems and ran out of time to work on it. I'll try to move forward soon, though. Can you describe the problems you ran into, and share any links you think are relevant?

tomarharsh14 commented 7 years ago

bump

onacrame commented 7 years ago

Another bump. A conda package would be great.

jcrudy commented 7 years ago

Thanks for the encouragement, everyone. I've been super busy, and unfortunately am unfamiliar with enough with the process of creating a conda repo that it would probably take me at least a full day to figure out. If anyone reading this has experience with conda repos and wants to help, it would of course be welcome and appreciated. Otherwise, I'll try to get to this as soon as I can, and please feel free to keep bumping this thread to remind me.

jameschartouni commented 6 years ago

Is the conda package out? I am having a hell of a time trying to install this package on a Windows 10 machine. Do you have any suggestions? Can't wait to use the package. Thanks.

jcrudy commented 6 years ago

@jameschartouni It is not, and probably won't be for some time. If you post your errors I may be able to help with the installation.

jameschartouni commented 6 years ago

I cloned the repo, cd in the py-earth directory and ran 'python setup.py install' using python3. I want to refrain from pasting all the processing messages, but the final result is: Using c:\users\james\appdata\local\programs\python\python36-32\lib\site-packages Finished processing dependencies for py-earth==0+untagged.491.gbc830fb . When I launch python3 and try to import pyearth, it fails. The only warning message is 'no files found matching 'pyearth\test\pathological_data'

jcrudy commented 6 years ago

@jameschartouni That's a problem I haven't seen before. Three questions:

  1. When you launch python3 and try the import, are you still in the cloned repo? If so, that could be a problem. Changing to another directory might fix it or at least give a better error message.

  2. Can you post the full stack trace from the error when you try to import?

  3. Can you post specifics about your platform: Is it 32 bit or 64? What C compiler are you using? Are you using Anaconda or something else?

I primarily use python 2 on linux and mac, so it's entirely possible this is a bug in py-earth that I need to fix. I do test on Windows and python 3, but there are many different configurations.

jameschartouni commented 6 years ago

Python 3.6.3 (v3.6.3:2c5fed8, Oct 3 2017, 17:26:49) [MSC v.1900 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information.

import pyearth Traceback (most recent call last): File "", line 1, in File "C:\Users\james\AppData\Local\Programs\Python\Python36-32\lib\site-packages\py_earth-0+untagged.491.gbc830fb-py3.6-win32.egg\pyearth__init__.py", line 6, in from .earth import Earth File "C:\Users\james\AppData\Local\Programs\Python\Python36-32\lib\site-packages\py_earth-0+untagged.491.gbc830fb-py3.6-win32.egg\pyearth\earth.py", line 1, in from ._forward import ForwardPasser File "pyearth/_basis.pxd", line 5, in init pyearth._forward cdef class BasisFunction: File "pyearth/_basis.pyx", line 15, in init pyearth._basis ModuleNotFoundError: No module named 'six'

jameschartouni commented 6 years ago

I am also using Anaconda. Trying to figure out which C compiler I am using. I normally use a mac, but am using Windows 10 for work.

jcrudy commented 6 years ago

@jameschartouni Do you have the package six installed? If not, you'll need to install it. I thought it was a standard module, but a quick search shows I was wrong.

jameschartouni commented 6 years ago

Installed package six.

from pyearth import Earth Traceback (most recent call last): File "", line 1, in File "C:\Users\james\AppData\Local\Programs\Python\Python36-32\lib\site-packages\py_earth-0+untagged.491.gbc830fb-py3.6-win32.egg\pyearth__init__.py", line 6, in from .earth import Earth

jcrudy commented 6 years ago

@jameschartouni I think that stack trace got cut off?

jameschartouni commented 6 years ago

oh sorry. this is the last line.

ModuleNotFoundError: No module named 'pyearth.earth'

jcrudy commented 6 years ago

@jameschartouni I suggest you uninstall the package and then reinstall. Perhaps installing without six messed you up. It seems like there could possibly be some issue with paths or with different versions of python coming into play, but I'm not sure. If you give me the full sequence of commands and output I might have a better guess.

jameschartouni commented 6 years ago

Deleted the pyearth folder in my users directory as well as the accompanying folder under site packages. Cloned from git, cd into the folder. Ran setup with python 3.6.

C:\Users\james>python Python 3.6.3 (v3.6.3:2c5fed8, Oct 3 2017, 17:26:49) [MSC v.1900 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information.

import pyearth Traceback (most recent call last): File "", line 1, in File "C:\Users\james\AppData\Local\Programs\Python\Python36-32\lib\site-packages\py_earth-0+untagged.491.gbc830fb-py3.6-win32.egg\pyearth__init.py", line 6, in from .earth import Earth File "C:\Users\james\AppData\Local\Programs\Python\Python36-32\lib\site-packages\py_earth-0+untagged.491.gbc830fb-py3.6-win32.egg\pyearth\earth.py", line 1, in from ._forward import ForwardPasser File "pyearth/_qr.pxd", line 4, in init pyearth._forward cdef class UpdatingQT: File "pyearth/_qr.pyx", line 1, in init pyearth._qr File "C:\Users\james\AppData\Local\Programs\Python\Python36-32\lib\site-packages\scipy\linalg\init__.py", line 175, in from .misc import * File "C:\Users\james\AppData\Local\Programs\Python\Python36-32\lib\site-packages\scipy\linalg\misc.py", line 5, in from .blas import get_blas_funcs File "C:\Users\james\AppData\Local\Programs\Python\Python36-32\lib\site-packages\scipy\linalg\blas.py", line 155, in from scipy.linalg import _fblas ImportError: DLL load failed: The specified module could not be found.

jameschartouni commented 6 years ago

I could post the full install trace if you want. It is just very long.

jcrudy commented 6 years ago

It looks like your scipy isn't installed correctly. Are you able to use scipy? Specifically, a compiled module within scipy, scipy.linalg._fblas, is failing to load. It seems similar to this: https://stackoverflow.com/questions/25406492/importing-scipy-or-scikit-image-from-scipy-linalg-import-fblas-import-error

jameschartouni commented 6 years ago

What seemed to fix it was deleting everything, installing numpy+mkl, then scipy. Thanks!

jameschartouni commented 6 years ago

Do you have any recommendations for how to add the pyearth package to my conda install of python?

jcrudy commented 6 years ago

@jameschartouni Glad it's working. I'm not sure what you mean by add it to your conda install? If you're referring to a conda environment, it should be installed in whichever one you were using when you installed it.

Fish-Soup commented 6 years ago

Hi any news on if py-earth has been added to conda?

cheers

jcrudy commented 6 years ago

@Fish-Soup @rth has generously taken charge of this, and I think might be finished or nearly finished. See the following:

https://github.com/conda-forge/staged-recipes/pull/5108

https://github.com/scikit-learn-contrib/py-earth/issues/178

Also, py-earth is already on pypi and can be installed with pip install sklearn-contrib-py-earth.

rth commented 6 years ago

Yes, py-earth was added to conda-forge, and can now be installed with,

conda install -c conda-forge sklearn-contrib-py-earth

cf https://github.com/conda-forge/sklearn-contrib-py-earth-feedstock for more details.

Fish-Soup commented 6 years ago

Cheers this helped a lot. My team are setting up a conda environment and this was very helpful.

MacYeh commented 6 years ago

Thanks for the development on conda repo. It helps me a lot

jens120 commented 5 years ago

would someone be so kind as to release a binary for 3.7? I could not compile on windows with Visual C++ Build Tools. The error was cl.exe exit status 2 In the end I ended up installing the precompiled wheel from https://www.lfd.uci.edu/~gohlke/pythonlibs/

rth commented 5 years ago

Closing since py-earth can now be installed from conda-forge.

would someone be so kind as to release a binary for 3.7?

@jens120 https://github.com/scikit-learn-contrib/py-earth/issues/191 would need to be resolved first. Probably better a separate issue about wheels for 3.7.