小编Sam*_*ako的帖子

Julia SimpleHypergraphs - Hypernetx 错误

我试图用库SimpleHypergraphs计算一个小例子。但是,我按照安装说明进行操作,出现此错误:

ERROR: "HyperNetX is not installed in Python used by this Julia. Install HyperNetX and reload SimpleHypergraphs.jl"
Run Code Online (Sandbox Code Playgroud)

这是我的代码:

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)
Run Code Online (Sandbox Code Playgroud)

我不明白为什么会出现这个错误,因为 hypernetx 安装得很好。

julia julia-plots

5
推荐指数
1
解决办法
57
查看次数

标签 统计

julia ×1

julia-plots ×1