gpt4 book ai didi

python - 导入 pyIpopt 时出错

转载 作者:行者123 更新时间:2023-11-28 18:51:02 35 4
gpt4 key购买 nike

我正在尝试安装和配置 pyIpopt。 Ipopt 已经安装并且示例运行良好。

在 shell 中,当我导入 pyIpopt 时,出现错误:

ImportError: /***PATH***/libipopt.so.1: undefined symbol: MPI_Init

pyIpopt git 项目的 FAQ 部分有 this为这些类型的错误提供:

Do a Google search to find the library file, and add -lWhateverLibrary in the makefile of pyipopt.

我用谷歌搜索并找到了这个:http://www.mcs.anl.gov/research/projects/mpi/www/www3/MPI_Init.html .我不知道如何获取该库或将其添加到 makefile 中...非常感谢任何帮助!

最佳答案

刚刚在 ubuntu 上遇到了类似的问题。

使用 libmumps-seq 对我有用:

  • 安装了 libmumps-seq-4.9.2(仅使用 apt-get,以及普通的 libmumps)
  • 在 setup.py 中将库列表参数“coinmumps”更改为“dmumps_seq-4.9.2”

重建并安装。

如果我理解正确,默认的 mumps 是分布式的(使用 MPI 库,这可能是一个痛苦的世界),我所需要的只是 mumps-seq 提供的顺序的。

关于python - 导入 pyIpopt 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13115775/

35 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com