Hi, I am new to Julia and Julia Discourse. I am facing the following error.
I am trying to set up an environment that I found in a Git repository. The steps I followed are:
- git clone 23tn / 23tn-julia · GitLab
- Opened Julia in the terminal (from the cloned folder) and,
] add .
activate .
. Now(@v1.9) pkg>
changed to(tn_julia) pkg>
.- Continuing in package mode,
instantiate
- At the end of the process, I encountered the following error,
Info Packages marked with ⌅ have new versions available but compatibility constraints restrict them from upgrading. To see why use `status --outdated -m`
Precompiling project...
✗ tn_julia
0 dependencies successfully precompiled in 11 seconds. 151 already precompiled.
1 dependency errored. To see a full report either run `import Pkg; Pkg.precompile()` or load the package
- I tried precompile,
- The error I get is, ERROR: LoadError: UndefVarError:
@printf
not defined
Stacktrace:
[1] top-level scope
@ :0
[2] include(mod::Module, _path::String)
@ Base .\Base.jl:457
[3] include(x::String)
@ tn_julia E:\tn\23tn-julia\src\tn_julia.jl:1
[4] top-level scope
@ E:\tn\23tn-julia\src\tn_julia.jl:10
[5] include
@ .\Base.jl:457 [inlined]
[6] 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
[7] top-level scope
@ stdin:3
in expression starting at E:\tn\23tn-julia\src\DMRG.jl:508
in expression starting at E:\tn\23tn-julia\src\DMRG.jl:339
in expression starting at E:\tn\23tn-julia\src\tn_julia.jl:1
in expression starting at stdin:3
julia> Pkg.test("Printf")
ERROR: UndefVarError: `Pkg` not defined
Stacktrace:
[1] top-level scope
@ REPL[5]:1
julia> using Pkg
julia> Pkg.test("Printf")
Testing Printf
Status `C:\Users\purva\AppData\Local\Temp\jl_BdrBIv\Project.toml`
[de0858da] Printf
[8dfed614] Test
[4ec0a83e] Unicode
Status `C:\Users\purva\AppData\Local\Temp\jl_BdrBIv\Manifest.toml`
[2a0f44e3] Base64
[b77e0a4c] InteractiveUtils
[56ddb016] Logging
[d6f4376e] Markdown
[de0858da] Printf
[9a3f8284] Random
[ea8e919c] SHA v0.7.0
[9e88b42a] Serialization
[8dfed614] Test
[4ec0a83e] Unicode
Testing Running tests...
Test Summary: | Pass Total Time
Printf | 1017 1017 22.4s
Testing Printf tests passed
(tn_julia) pkg> precompile
Precompiling project...
✗ tn_julia
0 dependencies successfully precompiled in 9 seconds. 151 already precompiled.
ERROR: The following 1 direct dependency failed to precompile:
tn_julia [53662e65-01d4-4314-8931-2bffaf2f7422]
Failed to precompile tn_julia [53662e65-01d4-4314-8931-2bffaf2f7422] to "C:\\Users\\purva\\.julia\\compiled\\v1.9\\tn_julia\\jl_69FE.tmp".
ERROR: LoadError: UndefVarError: `@printf` not defined
Stacktrace:
[1] top-level scope
@ :0
[2] include(mod::Module, _path::String)
@ Base .\Base.jl:457
[3] include(x::String)
@ tn_julia E:\tn\23tn-julia\src\tn_julia.jl:1
[4] top-level scope
@ E:\tn\23tn-julia\src\tn_julia.jl:10
[5] include
@ .\Base.jl:457 [inlined]
[6] 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
[7] top-level scope
@ stdin:3
in expression starting at E:\tn\23tn-julia\src\DMRG.jl:508
in expression starting at E:\tn\23tn-julia\src\DMRG.jl:339
in expression starting at E:\tn\23tn-julia\src\tn_julia.jl:1
in expression starting at stdin:3
The code in tn_julia.jl is,
module tn_julia
export getLocalSpace, getIdentity, contract, updateLeft
include("getLocalSpace.jl")
include("getIdentity.jl")
include("contract.jl")
include("updateleft.jl")
include("MPS.jl")
include("DMRG.jl")
end # module
Thanks in advance for any help/suggestions.
PS: I am familiar with basic level Julia. When providing help/suggestions, I would appreciate it if you keep this in mind.