Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Error in python_tutorial - No module named 'pkg_resources'

Open
#23 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
jupyter-notebook, python

Research direction

Start with the Python 3.12 notebook cell shown in the traceback and reproduce the failure when importing hyperopt. Inspect how the tutorial’s dependencies provide the missing pkg_resources module. Done when the tutorial runs past that import without ModuleNotFoundError.

Written by the indexing model from the issue text.

Description

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'
Dominant language
Jupyter Notebook
Stars
1.1k
Forks
422
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from catboost/tutorials

All issues in catboost/tutorials

Similar issues

More Machine Learning issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.