安装后在Julia中无法使用IterTools软件包

时间:2020-10-07 12:31:40

标签: package julia itertools

我是Julia的新手,我需要利用IterTools.jl软件包的特权。 我安装了:

using Pkg

Pkg.add("IterTools")

似乎安装了软件包。

但是,每当我尝试使用软件包中的任何功能时,都会出现错误。 例如:

for i in partition(1:9, 3)
    @show i
end

我收到以下错误:

ERROR: UndefVarError: partition not defined
Stacktrace:
 [1] top-level scope at none:0

我尝试安装的任何其他软件包都没有类似问题。 我尝试更新程序包,重新启动REPL并删除并重新安装程序包。这些都不起作用,我最终遇到了同样的问题。

非常感谢您的帮助。干杯!

1 个答案:

答案 0 :(得分:1)

好像您忘记加载程序包了:

using IterTools