gmontamat / gentun

Hyperparameter tuning for machine learning models using a distributed genetic algorithm
https://pypi.org/project/gentun/
Apache License 2.0
85 stars 22 forks source link

Trouble while installing package #23

Closed faridabdolhosseinpour closed 2 months ago

faridabdolhosseinpour commented 3 years ago

I use GoogleColab First i installed using this command :

%%bash
git clone https://github.com/gmontamat/gentun
cd gentun
python setup.py install

then i imported package using this command

from gentun import GeneticAlgorithm, Population, XgboostIndividual

i face this error

ImportError                               Traceback (most recent call last)
<ipython-input-2-a67f03c5af3f> in <module>()
      1 from sklearn.datasets import fetch_california_housing
----> 2 from gentun import GeneticAlgorithm, Population, XgboostIndividual

ImportError: cannot import name 'GeneticAlgorithm' from 'gentun' (unknown location)

---------------------------------------------------------------------------
NOTE: If your import is failing due to a missing package, you can
manually install dependencies using either !pip or !apt.

To view examples of installing some common dependencies, click the
"Open Examples" button below.
---------------------------------------------------------------------------

after excuting this command output is

import gentun
dir(gentun)
['__doc__',
 '__file__',
 '__loader__',
 '__name__',
 '__package__',
 '__path__',
 '__spec__']
gmontamat commented 2 months ago

You can now install this package with pip:

pip install "gentun[xgboost]"