嘿哟。
我一直在努力运行软件包,可能需要一些帮助。这是我到目前为止所做的:
使用Pkg生成一个名为Void的项目
添加了CSV和DataFrames作为依赖项(已在 TOML 中列出)
查看项目状态(包括两个库)
实例化
但是,我的项目仍然不会运行任何包含这些库的内容。这是我的代码:
# src/Void.jl
using CSV, DataFrames
module Void
function testing()
frame = CSV.read("sheet.csv", DataFrame)
print(frame)
end
end
Void.testing()
export Void
我尝试julia --project=. src/Void.jl
运行这个脚本,但它给了我UndefVarError: `CSV` not defined
.
尝试julia --project=.
按此using Void
顺序抛出一个错误,指出 CSV 也不是依赖项。
ERROR: LoadError: ArgumentError: Package Base does not have CSV in its dependencies:
- You may have a partially installed environment. Try `Pkg.instantiate()`
to ensure all packages in the environment are installed.
- Or, if you have Base checked out for development and have
added CSV as a dependency but haven't updated your primary
environment's manifest file, try `Pkg.resolve()`.
- Otherwise you may need to report an issue with Base
Stacktrace:
[1] macro expansion
@ .\loading.jl:1634 [inlined]
[2] macro expansion
@ .\lock.jl:267 [inlined]
[3] require(into::Module, mod::Symbol)
@ Base .\loading.jl:1611
[4] include
@ .\Base.jl:457 [inlined]
[5] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::Nothing)
@ Base .\loading.jl:2049
[6] top-level scope
@ stdin:3
in expression starting at C:\Users\alunotemp\Área de Trabalho\Codes\Void\src\Void.jl:1
in expression starting at stdin:3
我也尝试按照错误提示执行操作,但没有成功。我究竟做错了什么?