我试图用库SimpleHypergraphs计算一个小例子。我按照安装说明进行操作,但出现此错误:
ERROR: "HyperNetX is not installed in Python used by this Julia. Install HyperNetX and reload SimpleHypergraphs.jl"
这是我的代码:
using PyCall
using Conda
Conda.runconda(`install matplotlib --yes`)
Conda.runconda(`install networkx --yes`)
run(`$(PyCall.python) -m pip install hypernetx`)
using SimpleHypergraphs
h = Hypergraph{Float64}(5,4)
h[1:3,1] .= 1.5
h[3,4] = 2.5
h[2,3] = 3.5
h[4,3:4] .= 4.5
h[5,4] = 5.5
h[5,2] = 6.5
draw(h, HyperNetX; width=5, height=5)
我不明白为什么会出现这个错误,因为 hypernetx 安装得很好。