ERROR: Could not build wheels for mpi4py, which is required to install pyproject.toml-based projects
近期新装了一台深度学习工作站,完成基本环境的配置。但是在Python多进程模块配置上遇到了以前也遇到过的问题,为了防止相似情况再次发生,特此记下。
问题描述:
执行以下命令:
pip install mpi4py
报错信息:
Collecting mpi4py==3.1.3
Using cached mpi4py-3.1.3.tar.gz (2.5 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: mpi4py
Building wheel for mpi4py (pyproject.toml) ... error
error: subprocess-exited-with-error。。。。。。(此处省略N行,只显示最后报错的关键信息)
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for mpi4py
Failed to build mpi4py
ERROR: Could not build wheels for mpi4py, which is required to install pyproject.toml-based projects
解决方法:
在网上搜索了很多种解决途径,这里都列举一下,但是只有第二个方法对我电脑的情况有效。
方法一:更新pip
pip3 install --upgrade pip
方法二:安装mpi依赖库
sudo apt updatesudo apt-get install libopenmpi-dev
来源地址:https://blog.csdn.net/wenzhang1216/article/details/126902883
免责声明:
① 本站未注明“稿件来源”的信息均来自网络整理。其文字、图片和音视频稿件的所属权归原作者所有。本站收集整理出于非商业性的教育和科研之目的,并不意味着本站赞同其观点或证实其内容的真实性。仅作为临时的测试数据,供内部测试之用。本站并未授权任何人以任何方式主动获取本站任何信息。
② 本站未注明“稿件来源”的临时测试数据将在测试完成后最终做删除处理。有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341