在这个源代码之后,我想在colab:https://github.com/james77777778/metis_python中安装METIS和Python包装器
安装步骤如下:
下载并从METIS中提取metis-5.1.0.tar.gz -串行图分区和减少填充矩阵排序metis-5.1.0
但是,我不知道如何在colab中具体执行步骤2-4,因此我得到了以下错误: RuntimeError:无法找到METIS。请将METIS_DLL环境变量设置为其完整路径。
谢谢!
发布于 2022-09-28 06:08:07
问题似乎是libmetis.so文件的位置。将文件复制到/usr/lib并更新环境变量的路径成功地完成了该过程:
import requests
import tarfile
# Download and extract the file
url = "http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-5.1.0.tar.gz"
response = requests.get(url, stream=True)
file = tarfile.open(fileobj=response.raw, mode="r|gz")
file.extractall(path=".")
# Change working directory
%cd metis-5.1.0
# The remaining steps as you have shown in the question, with updated path
!make config shared=1 prefix=~/.local/
!make install
!cp ~/.local/lib/libmetis.so /usr/lib/libmetis.so
!export METIS_DLL=/usr/lib/libmetis.so
!pip3 install metis-python
import metispy as metishttps://stackoverflow.com/questions/73860660
复制相似问题