Skip to content

Error in python_tutorial - No module named 'pkg_resources' #23

@robmarkcole

Description

@robmarkcole

The error, py 3.12:

---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
Cell In[36], line 1
----> 1 import hyperopt
      3 def hyperopt_objective(params):
      4     model = CatBoostClassifier(
      5         l2_leaf_reg=int(params['l2_leaf_reg']),
      6         learning_rate=params['learning_rate'],
   (...)     11         loss_function=metrics.Logloss(),
     12     )

File ~/gitlab/catboost-experiments/.venv/lib/python3.12/site-packages/hyperopt/__init__.py:34
     32 from . import rand
     33 from . import tpe
---> 34 from . import atpe
     35 from . import mix
     36 from . import anneal

File ~/gitlab/catboost-experiments/.venv/lib/python3.12/site-packages/hyperopt/atpe.py:19
     17 import numpy
     18 import numpy.random
---> 19 import pkg_resources
     20 import tempfile
     21 import scipy.stats

ModuleNotFoundError: No module named 'pkg_resources'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions