-
Notifications
You must be signed in to change notification settings - Fork 122
Installation of pyearth with python 3.8.10 #221
Comments
@pgr123 Have you tried building it directly from source? I always have good luck with that. Assuming you are using anaconda in the default location, it would be:
|
This project is largely abandoned, and the pip release is out of date. There is a branch here that seems to work for most folks: |
Are there any reasons for it being abandoned other than time cost to update the package? |
@jhogg11 The main author has largely abandoned the project. However, there is nothing to stop someone from forking the repo and taking up the reins |
Thank you for your responses. |
@pgr123 Haven't tried it on 3.10 but I can confirm it does work on 3.9. If you want to try it on 3.10, the following code may work for you:
|
I'm also using 3.9 and this works for me. Thank you! |
Thank you but that does not work. and at the end I got : Do you think there is a solution ? |
@pgr123 the project has been abandoned so if you are dead set on using py-earth then my suggestion would be to use python 3.8 or 3.9 |
It's a pity ! |
The problem seems to be with Python 3.10. |
Even Spyder does not work with Ubuntu 22.04.1 and Python 3.10 ! |
does this work when I'm installing pyEarth on a virtual environment? (i.e a Django environment) |
How can I install py-earth on a virtual environment ? I never used virtual environment and I don't know what Django is. |
The update to Spyder 5.4.0 works with Ubuntu 22.04.1 and Python 3.10.6 but I have actually no solution for py-earth. |
@vea-therese it installs fine using pipenv, so I see no reason why it wouldn’t install in other virtual environment setups |
I've tried pip install and cloning but it still won't work. Though I haven't tried downgrading my python version, I currently have 3.10 |
@vea-therese Others have mentioned it won’t install properly on 3.10 but should install fine on <= 3.9 |
That is true but how can I change the Python 3.10 do downgrade to Python 3.9. And I must reinstall all my python packages and the problem is that Ubuntu 22.04.1 use Python 3.10.6 so it is used by the OS and I cannot change it. What can I do ? |
I downgraded my global python to 3.7, it still didn't work. I tried 3.7 because I was able to install pyearth in a conda environment with a 3.7 python weeks ago. That's why I'm wondering if it is possible to connect a virtual environment or the Django project into my conda environment with pyearth. |
if you're using conda, I just typed: conda install python=3.7 or 3.9 since that's the version that you prefer. Though if you're referring to the global python, I just uninstalled the 3.10 and installed 3.7. I use Windows, I'm not familiar with Ubuntu. |
Thank you, I don't use conda. |
@vea-therese Here is a code snippet to try to install it in a virtual environment.
If that doesn't work, this docker image may help you install py-earth into a virtual environment: https://gitlab.com/gitlab-data/data-science |
Thank you, I'll try that tomorrow. |
I forgot to thank u @kevin-dietz it worked! We're now presenting our thesis. |
Good morning, |
Thank you! Just an addition, I had to replace "exc_" with "curexc_" for the other .c files as well and using python setup.py install --cythonize |
@kevin-dietz the analytics image in your repo seems based on Python 3.7. What is the minor version of 3.9 or cython version you have to make it work? I could not compile on Linux based system. Thanks. |
@vancities we have stopped supporting py-earth in our image because the package has not been updated in 5.5 years. |
I succeeded in running py-earth with Python 3.10 with few modifs and it works well ! |
Hi, how did you do this? |
Hi Williamz4lyf, |
Hi pgr123, could you share which numpy and cython version do you use? If you could share correctred directory, it would be wonderful. @evertonsantanaj mentioned that there are more .c files needed to be changed. |
Hi vancities, I use numpy 1.23.3 and cython 0.29.14. |
Hi @pgr123, Thanks for your reply and sharing. Do you happen to still have the files that before compilation(the repo you made modification before running
|
@pgr123 It would be helpful if you could just zip the modified files, as stated by @vancities . |
Here is the corrected version of the modified files for pYTHON 3.10. I hope that help. |
Thank you very much @pgr123 ! |
With pleasure ! |
@pgr123 can you help me to resolve the issue I have with installing this package?
replaced files with modified versions you have provided in pyearth.zip.. But then, it can't compilate files using Cython?
|
The problem is that pyearth does not work with the new new versions of numpy and scipy so what I have do is to install the good versions with |
installed the versions you mentioned, but still the same issue:
do not know what to do with this. Maybe it's because of the Cythonization? |
Yes, surely, but you don't need to recompile the sources. You have just to copy the directory pyearth of my zip in /usr/lib/python3/dist-packages if you use Linux. On windows, you must search where is the directory dist-packages for python3 and copy here. I don't use Windows so I do not know where it is. |
I use now Python 3.10 and my version of pyearth works well. |
I use Ubuntu 22.04.2 LTS under WSL. Copied unzipped your paskage folder to my virtual environment: .venv/lib/python3.10/site-packages When trying to import this I got next:
numpy version installed 1.21.25... |
I use also Ubuntu 22.04 and it works. |
Unfortunately I need to work within virtualenvironment for this project. I suppose that for my case moving to my virtualenvironment directory (/..../path_to_project/.venv/lib/python3.10/site-packages) it's the same as you suggest for global environment... Because VE is isolated. and we can see that error appears when we import a package which was unzipped. and pylance sees the package... but some issues with data types appear. |
It seems you use numpy 1.21.25 and have you tried with the version I recommanded (numpy 1.21.5) ? |
Hello twistfire, did you succeed ? |
Hello @pgr123 thanks for your interest. will test today evening and report here. But found that it's not recommended to use this package with python >3.6 .. but in my project i have to use at least 3.10, maybe can downgrade to 3.9.. So will write. |
Where have you seen that it's not recommended to use this package with python >3.6 ? I don't see why ? What is the reason ? |
Hello twistfire, |
@pgr123 About Python 3.6 and compatibility/dependencies - I googled all the info I could and one of the guys who showed nice results plots commented for a guy who wanted to use it with python 3.9 that he should use 3.6 instead to use compatibility.. (can't find it again).. Nevertheless. I have downgraded the version of numpy to 1.21.5 and broke my current project - I have to use the newest version of numpy there.. because of the pandas dependencies... But when I created a "clean" Python 3.10.6 virtual environment and installed it all from scratch + -> it worked (!!) - exactly like you suggested. Now I am thinking about how to find a pandas version to work with my hdf5 datasets and use numpy version 1.21.5... :( if it's possible of course. Here is some result as a test. So thank you very much for your tries and support!!! However, it seems that this automated approach is not working like I want for my task... E.g. here is the model data I have - blue dots, and as a fit-result, I got something very poor.... While experiments with the initial demo datasets work well enough. It seems that I need to find and tune some parameters for the fitter - to be more sensitive and catch the signal form I have.. Again, thank you for your efforts and support! |
If you want, you can use Orange data mining (https://orangedatamining.com/), there is an addon to do MARS (earth) model and there are many other things interesting. |
@pgr123 Thanks! Did you use the Orange package? I have tried on a local machine and it seems MARS is not provided... |
It seems that this is an addon (https://orangedatamining.com/blog/earth-multivariate-adaptive-regression-splines/) that you must add to orange3. I did not tried it. Say me if you find how it works. |
I was having the same problems as @twistfire installing in mac and a venv with Python 3.11. A configuration that worked for me: And after that: I just needed to further adjust some parts in the code that used deprecated versions for int and float in numpy. py-earth-master_backup_np copy.zip Thank you for all the comments and discussions here, special kudos to @pgr123 ! |
Good evening
I tried to install pyearth with pip3 install sklearn-contrib-py-earth but I got errors.
I have installed sklearn with pip3 install -U scikit-learn without problem.
What can I do ? How can I install pyearth on python 3.8 ?
Thank you to help me.
Excuse my bad english (I am french).
P. Grandeau
The text was updated successfully, but these errors were encountered: