我在/Users/myuser/Documents/JuliaLearn/Julia/mysource.jl
在Julia Repl,我试图以:
运行include("/Users/myuser/Documents/JuliaLearn/Julia/mysource.jl")
但是得到这个错误:
错误:无法打开文件 /Users/myuser/~/Documents/JuliaLearn/Julia/mysource.jl in include at /Applications/Julia-0.4.5.app/Contents/Resources/julia/lib/julia/sys.dylib 在include_from_node1中 /Applications/Julia-0.4.5.app/Contents/Resources/julia/lib/julia/sys.dylib
我也试过但得到类似上面的错误:
include("~/Documents/JuliaLearn/Julia/mysource.jl")
知道我做错了吗?
答案 0 :(得分:1)
与OS同构:
cd(joinpath(homedir(),"a_long","path","to_your","files"));
include("your_julia_file.jl")