Ubuntu系统使用pip安装Mindsdb时出现依赖相关错误求助
Ubuntu下pip安装MindsDB报错:找不到requirements/requirements.txt
错误详情
在Ubuntu系统中使用pip安装MindsDB时出现以下错误,核心问题是构建wheel过程中找不到依赖文件:
Collecting mindsdb Using cached MindsDB-23.6.1.1.tar.gz (6.2 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 ╰─> [18 lines of output] Traceback (most recent call last): File "/home/activelap13/.local/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module> main() File "/home/activelap13/.local/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main json_out['return_val'] = hook(**hook_input['kwargs']) File "/home/activelap13/.local/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel return hook(config_settings) File "/tmp/pip-build-env-m_ejci5d/overlay/local/lib/python3.10/dist-packages/setuptools/build_meta.py", line 341, in get_requires_for_build_wheel return self._get_build_requires(config_settings, requirements=['wheel']) File "/tmp/pip-build-env-m_ejci5d/overlay/local/lib/python3.10/dist-packages/setuptools/build_meta.py", line 323, in _get_build_requires self.run_setup() File "/tmp/pip-build-env-m_ejci5d/overlay/local/lib/python3.10/dist-packages/setuptools/build_meta.py", line 487, in run_setup super(_BuildMetaLegacyBackend, File "/tmp/pip-build-env-m_ejci5d/overlay/local/lib/python3.10/dist-packages/setuptools/build_meta.py", line 338, in run_setup exec(code, locals()) File "<string>", line 87, in <module> File "<string>", line 41, in define_deps FileNotFoundError: [Errno 2] No such file or directory: 'requirements/requirements.txt' [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.
注:该错误来自子进程,大概率不是pip本身的问题。
解决方法
1. 升级pip及相关工具
先确保pip、setuptools和wheel是最新版本,避免因工具版本过低导致兼容性问题:
pip install --upgrade pip setuptools wheel
2. 安装最新版MindsDB
你尝试安装的23.6.1.1版本可能存在打包缺陷,直接安装最新稳定版:
pip install mindsdb --upgrade
如果需要指定版本,可先确认MindsDB的最新版本号,再执行类似pip install mindsdb==[最新版本号]的命令。
3. 从GitHub源码手动安装
如果上述方法无效,直接克隆完整源码包,确保依赖文件完整:
git clone https://github.com/mindsdb/mindsdb.git cd mindsdb pip install -r requirements/requirements.txt pip install .
内容的提问来源于stack exchange,提问作者Nitish Roy
相关产品推荐
相关产品推荐

