我知道有几篇关于如何清除julia早期版本的工作空间和变量的文章。
但是,我正在使用Julia v“ 1.0.3”和Atom的最新更新。 我也有Julia的最新版本“ 1.1.0”
但是,我尝试过
x=49
workspace()
clear!(:x)
# and even
clearconsole() # working but just clear the concle
Control + l # working but just clear the concle
没有一个为我清除变量。 此外,workspace()和clear!(:x)返回错误消息
ERROR: UndefVarError: julia not defined
Stacktrace:
[1] top-level scope at none:0
您能帮我弄清楚如何清除Julia中的变量吗? (清除单个x和/或整个工作区)谢谢。
答案 0 :(得分:1)
workspace()已在Julia 1.0中删除,因为它有问题并且不灵活。
现在首选的方法是使用Revise.jl软件包。
答案 1 :(得分:0)
Atom似乎找不到Julia。如果无法通过命令julia
访问到Julia,则可能需要添加该路径。为此,请转到“软件包”>“ Julia”>“设置”,然后在“ Julia路径”的第一个框中插入您的Julia安装路径(例如:C:\Users\UserName\AppData\Local\Julia-1.0.0\bin\julia.exe
)