te')); return $arr; } /* 遍历用户所有主题 * @param $uid 用户ID * @param int $page 页数 * @param int $pagesize 每页记录条数 * @param bool $desc 排序方式 TRUE降序 FALSE升序 * @param string $key 返回的数组用那一列的值作为 key * @param array $col 查询哪些列 */ function thread_tid_find_by_uid($uid, $page = 1, $pagesize = 1000, $desc = TRUE, $key = 'tid', $col = array()) { if (empty($uid)) return array(); $orderby = TRUE == $desc ? -1 : 1; $arr = thread_tid__find($cond = array('uid' => $uid), array('tid' => $orderby), $page, $pagesize, $key, $col); return $arr; } // 遍历栏目下tid 支持数组 $fid = array(1,2,3) function thread_tid_find_by_fid($fid, $page = 1, $pagesize = 1000, $desc = TRUE) { if (empty($fid)) return array(); $orderby = TRUE == $desc ? -1 : 1; $arr = thread_tid__find($cond = array('fid' => $fid), array('tid' => $orderby), $page, $pagesize, 'tid', array('tid', 'verify_date')); return $arr; } function thread_tid_delete($tid) { if (empty($tid)) return FALSE; $r = thread_tid__delete(array('tid' => $tid)); return $r; } function thread_tid_count() { $n = thread_tid__count(); return $n; } // 统计用户主题数 大数量下严谨使用非主键统计 function thread_uid_count($uid) { $n = thread_tid__count(array('uid' => $uid)); return $n; } // 统计栏目主题数 大数量下严谨使用非主键统计 function thread_fid_count($fid) { $n = thread_tid__count(array('fid' => $fid)); return $n; } ?>KeyError: 'VERSION' issue with pip installing catboost on python 3.13.1 - Stack Overflow
最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

KeyError: 'VERSION' issue with pip installing catboost on python 3.13.1 - Stack Overflow

programmeradmin3浏览0评论

I am working on this ml project and I need to install catboost and xgboost using pip. the xgboost got installed successfully but catboost keeps giving the same error:

(venv) D:\ML bootcamp\mlproject>pip install catboost        
Collecting catboost
  Using cached catboost-1.2.7.tar.gz (71.5 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [24 lines of output]
      Traceback (most recent call last):
        File "D:\ML bootcamp\mlproject\venv\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 389, in <module>
          main()
          ~~~~^^
        File "D:\ML bootcamp\mlproject\venv\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 373, in main
          json_out["return_val"] = hook(**hook_input["kwargs"])
                                   ~~~~^^^^^^^^^^^^^^^^^^^^^^^^
        File "D:\ML bootcamp\mlproject\venv\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 143, in get_requires_for_build_wheel
          return hook(config_settings)
        File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-xzdiplgy\overlay\Lib\site-packages\setuptools\build_meta.py", line 334, in get_requires_for_build_wheel       
          return self._get_build_requires(config_settings, requirements=[])
                 ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-xzdiplgy\overlay\Lib\site-packages\setuptools\build_meta.py", line 304, in _get_build_requires
          self.run_setup()
          ~~~~~~~~~~~~~~^^
        File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-xzdiplgy\overlay\Lib\site-packages\setuptools\build_meta.py", line 522, in run_setup
          super().run_setup(setup_script=setup_script)      
          ~~~~^^^^^^^^^^^^^^^^
        File "<string>", line 733, in <module>
        File "<string>", line 205, in get_catboost_version
      KeyError: 'VERSION'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

I have tried what I could, but I don't know what else to do to fix this. Please let me know if someone knows the solution to this.

I am working on this ml project and I need to install catboost and xgboost using pip. the xgboost got installed successfully but catboost keeps giving the same error:

(venv) D:\ML bootcamp\mlproject>pip install catboost        
Collecting catboost
  Using cached catboost-1.2.7.tar.gz (71.5 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [24 lines of output]
      Traceback (most recent call last):
        File "D:\ML bootcamp\mlproject\venv\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 389, in <module>
          main()
          ~~~~^^
        File "D:\ML bootcamp\mlproject\venv\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 373, in main
          json_out["return_val"] = hook(**hook_input["kwargs"])
                                   ~~~~^^^^^^^^^^^^^^^^^^^^^^^^
        File "D:\ML bootcamp\mlproject\venv\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 143, in get_requires_for_build_wheel
          return hook(config_settings)
        File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-xzdiplgy\overlay\Lib\site-packages\setuptools\build_meta.py", line 334, in get_requires_for_build_wheel       
          return self._get_build_requires(config_settings, requirements=[])
                 ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-xzdiplgy\overlay\Lib\site-packages\setuptools\build_meta.py", line 304, in _get_build_requires
          self.run_setup()
          ~~~~~~~~~~~~~~^^
        File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-xzdiplgy\overlay\Lib\site-packages\setuptools\build_meta.py", line 522, in run_setup
          super().run_setup(setup_script=setup_script)      
          ~~~~^^^^^^^^^^^^^^^^
        File "<string>", line 733, in <module>
        File "<string>", line 205, in get_catboost_version
      KeyError: 'VERSION'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

I have tried what I could, but I don't know what else to do to fix this. Please let me know if someone knows the solution to this.

Share Improve this question edited 2 days ago Klaus D. 14.4k5 gold badges43 silver badges52 bronze badges asked 2 days ago Mohammed Saim QuadriMohammed Saim Quadri 456 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 1

According to the catboost installation docs

CatBoost Python package supports only CPython Python implementation with versions < 3.13. Version 3.13.x support is in progress.

Source: https://catboost.ai/docs/en/concepts/python-installation

There is also an open issue for this on their github repo:

https://github/catboost/catboost/issues/2748


A possible solution would be to use a version of python that catboost currently supports. e.g. 3.12.x

发布评论

评论列表(0)

  1. 暂无评论