Ludwig无法在Python 3.10和Windows 10上安装

fiei3ece  于 2个月前  发布在  Python
关注(0)|答案(1)|浏览(37)

在Python 3.10和Windows 10上运行pip install ludwig时,出现了以下错误:

Collecting scikit-learn<1.0
  Using cached scikit-learn-0.24.2.tar.gz (7.5 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [46 lines of output]
      Partial import of sklearn during the build process.
      INFO: No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
      Traceback (most recent call last):
      /---/
      distutils.errors.DistutilsPlatformError: 
      Microsoft Visual C++ 14.0 or greater is required. 
      Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
      [end of output]

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

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

当我fork ludwig并尝试从本地requirements.txt文件安装依赖项时,一切都正常,scikit-learn版本为1.0.5
为什么pip使用的是scikit-learn版本0.24.2?
即使已安装MS构建工具,错误信息仍然存在。

pengsaosao

pengsaosao1#

感谢aabmets的回复。我想这个问题与3.10及更高版本的scikit-learn有关。需要测试是否增加scikit-learn的版本会破坏某些地方的测试,并相应地进行调整。很快就会回复您。很高兴您已经能够在安装了更新版本的scikit-learn的情况下使用Ludwig。

@justinxzhao@jimthompson5802@dantreiman@geoffreyangus 仅供参考

相关问题