heal-research / pyoperon

Python bindings and scikit-learn interface for the Operon library for symbolic regression.
MIT License
34 stars 10 forks source link

installl the pyoperon by "pip install pyoperon" #20

Closed luokuang2001 closed 1 week ago

luokuang2001 commented 1 week ago

I installled the pyoperon by "pip install pyoperon" https://pypi.org/project/pyoperon/

Then I run the "operon-skilearn.py" it thew out the error:

Traceback (most recent call last): File "/home/lk/pyoperon/example/operon-sklearn.py", line 62, in reg.fit(X_train, y_train) File "/home/lk/pyoperon/pyoperon/sklearn.py", line 427, in fit ds = op.Dataset(D) ^^^^^^^^^^ AttributeError: module 'pyoperon' has no attribute 'Dataset'

How can I fix it? Thank you

foolnotion commented 1 week ago

Hi,

The version currently on PyPI is outdated. Could you try one of the wheels from our recent release? (following a testing period, the 0.4.0 release will also be uploaded to PyPI).

https://github.com/heal-research/pyoperon/releases/tag/v0.4.0

To install, select the appropriate wheel (same arch, same python version) and install it with pip install.

luokuang2001 commented 1 week ago

Hello, I install with : "pip install pyoperon-0.4.0-cp312-cp312-manylinux_2_28_x86_64.whl" again, Processing ./pyoperon-0.4.0-cp312-cp312-manylinux_2_28_x86_64.whl Installing collected packages: pyoperon Successfully installed pyoperon-0.4.0 Picture1

but when I run the "operon-skilearn.py" again, it throws the error: " Traceback (most recent call last): File "/home/lk/pyoperon/example/operon-sklearn.py", line 11, in from pyoperon.sklearn import SymbolicRegressor File "/home/lk/pyoperon/pyoperon/init.py", line 4, in from .pyoperon import * ModuleNotFoundError: No module named 'pyoperon.pyoperon' "

How can I fix it? Thank you

luokuang2001 commented 1 week ago

Sorry, I confused the instructions in https://github.com/heal-research/pyoperon?tab=readme-ov-file and the "pip install" way. I have solved my problem, thank you a lot!